Message267986
According to <http://man7.org/linux/man-pages/man2/getrandom.2.html>, getrandom() returns no more than 32 MiB as an int on Linux. Doesn’t that mean you can rely on syscall()’s long return value fitting in an int? Maybe just cast n = (int)sycall(...) to be explicit.
But it does make sense to cap n to LONG_MAX just in case there is some strange platform where it matters :) |
|
Date |
User |
Action |
Args |
2016-06-09 08:16:25 | martin.panter | set | recipients:
+ martin.panter, vstinner |
2016-06-09 08:16:25 | martin.panter | set | messageid: <1465460185.11.0.490434290928.issue27278@psf.upfronthosting.co.za> |
2016-06-09 08:16:25 | martin.panter | link | issue27278 messages |
2016-06-09 08:16:25 | martin.panter | create | |
|