diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-24 15:17:12 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-31 09:14:10 -0300 |
commit | 7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae (patch) | |
tree | 0aaeaf9fbb7483e5b302823d0fbc074052ccfdee /stdlib | |
parent | 3ff447f7dfcb79740e30f6247c1d4d5344244a35 (diff) | |
download | glibc-7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae.tar glibc-7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae.tar.gz glibc-7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae.tar.bz2 glibc-7f2ddf7400bb959897a5fe58f7fc5fbe5e57cfae.zip |
stdlib: Fix tst-getrandom memcmp call
The idea is to check if the up sizeof (buf) are equal, not only
the first byte.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/tst-getrandom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/tst-getrandom.c b/stdlib/tst-getrandom.c index 608fc4746e..61c3cae92e 100644 --- a/stdlib/tst-getrandom.c +++ b/stdlib/tst-getrandom.c @@ -189,7 +189,7 @@ test_getentropy (void) /* The probability that these two buffers are equal is very small. */ - if (memcmp (buf, buf2, sizeof (buf) == 0)) + if (memcmp (buf, buf2, sizeof (buf)) == 0) { printf ("error: getentropy appears to return constant bytes\n"); errors = true; |