AW: AW: [patch] random.3: wfix: RAND_MAX is for rand(3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



misunderstanding,

the page random(3) says (in my version)
"range from 0 to 2**31-1." it does not mention
rand_max, INT32_MAX or some other constant only the numerical value.

It happens to be INT32_MAX, but in this case i would simply drop it.
________________________________________
Von: Jakub Wilk <jwilk@xxxxxxxxx>
Gesendet: Montag, 8. Juni 2020 13:21:01
An: Walter Harms
Cc: John Marshall; Michael Kerrisk; linux-man@xxxxxxxxxxxxxxx
Betreff: Re: AW: [patch] random.3: wfix: RAND_MAX is for rand(3)

* Walter Harms <wharms@xxxxxx>, 2020-06-08, 11:10:
>INT32_MAX is not mentioned in the POSIX page

Yes, it is:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html#tag_13_47_03_02

--
Jakub Wilk




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux