svn commit: r303342 - in head: include lib/libc/stdlib
Ed Schouten
ed at nuxi.nl
Thu Jul 28 13:02:58 UTC 2016
Hi Bruce,
2016-07-27 2:44 GMT+02:00 Bruce Evans <brde at optusnet.com.au>:
> This might work here since the type is unsigned, but it wouldn't work to
> change from int to long.
Yes. That's a pretty good remark. What makes this pretty safe in this
case is that srandom() discard the top bits anyway. The first thing it
does is cast the argument to an uint32_t, so even if we didn't
properly zero/size extend this, it wouldn't end up being used.
Best regards,
--
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
More information about the svn-src-all
mailing list