about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorJohn Marshall <John.W.Marshall@glasgow.ac.uk>2020-06-30 14:16:03 -0400
committerCarlos O'Donell <carlos@redhat.com>2020-06-30 14:20:17 -0400
commit354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba (patch)
treee1f168e14981e59de0b59f6144db58d91079001d /stdlib
parent3ee1e0ec5cd0441954be9181dc437358846b39c6 (diff)
downloadglibc-354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba.tar.gz
glibc-354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba.tar.xz
glibc-354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba.zip
random: range is not portably RAND_MAX [BZ #7003]
On other platforms, RAND_MAX (which is the range of rand(3))
may differ from 2^31-1 (which is the range of random(3)).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/stdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index f971df4247..3aa27a9d25 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -397,7 +397,7 @@ extern long int a64l (const char *__s)
    `initstate' and `setstate' functions are those from BSD Unices.
    The `rand' and `srand' functions are required by the ANSI standard.
    We provide both interfaces to the same random number generator.  */
-/* Return a random long integer between 0 and RAND_MAX inclusive.  */
+/* Return a random long integer between 0 and 2^31-1 inclusive.  */
 extern long int random (void) __THROW;
 
 /* Seed the random number generator with the given number.  */