aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-12-23 14:27:30 +0000
committerDmitry V. Levin <ldv@altlinux.org>2017-12-23 14:27:30 +0000
commita47ad79afa454192224214a3db2499de12baf93e (patch)
tree0fa03bf358ccf2de7972d57a9e6759adb577add8
parentf5c558f3ecdf1d635f5614f5b49cd630786df46a (diff)
downloadglibc-a47ad79afa454192224214a3db2499de12baf93e.zip
glibc-a47ad79afa454192224214a3db2499de12baf93e.tar.gz
glibc-a47ad79afa454192224214a3db2499de12baf93e.tar.bz2
getrandom: fix comment [BZ #22347]
* stdlib/getrandom.c (getrandom): Fix comment. * sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--stdlib/getrandom.c4
-rw-r--r--sysdeps/unix/sysv/linux/getrandom.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4050ec4..b9c3010 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-12-23 Dmitry V. Levin <ldv@altlinux.org>
+
+ [BZ #22347]
+ * stdlib/getrandom.c (getrandom): Fix comment.
+ * sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise.
+
2017-12-23 Aurelien Jarno <aurelien@aurel32.net>
[BZ #21161]
diff --git a/stdlib/getrandom.c b/stdlib/getrandom.c
index b2a83c2..268b0e4 100644
--- a/stdlib/getrandom.c
+++ b/stdlib/getrandom.c
@@ -19,8 +19,8 @@
#include <sys/random.h>
#include <errno.h>
-/* Write LENGTH bytes of randomness starting at BUFFER. Return the
- number of bytes written, or -1 on error. */
+/* Write up to LENGTH bytes of randomness starting at BUFFER.
+ Return the number of bytes written, or -1 on error. */
ssize_t
getrandom (void *buffer, size_t length, unsigned int flags)
{
diff --git a/sysdeps/unix/sysv/linux/getrandom.c b/sysdeps/unix/sysv/linux/getrandom.c
index 25eb6ef..31b0e4e 100644
--- a/sysdeps/unix/sysv/linux/getrandom.c
+++ b/sysdeps/unix/sysv/linux/getrandom.c
@@ -22,8 +22,8 @@
#include <sysdep-cancel.h>
#ifdef __NR_getrandom
-/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
- success and -1 on failure. */
+/* Write up to LENGTH bytes of randomness starting at BUFFER.
+ Return the number of bytes written, or -1 on error. */
ssize_t
getrandom (void *buffer, size_t length, unsigned int flags)
{