diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-11 07:45:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-11 11:19:19 +0200 |
commit | 67da2cc883fb261d2f9e5819df5646b2165196a8 (patch) | |
tree | 92fc2654b16acd354383676c1ecfde9a4fe39bc6 /src | |
parent | pid1: shorten dump output a bit by not repeating unit id twice (diff) | |
download | systemd-67da2cc883fb261d2f9e5819df5646b2165196a8.tar.xz systemd-67da2cc883fb261d2f9e5819df5646b2165196a8.zip |
test-alloc-util: assert on the return value to appease coverity
Coverity is right that we should check the return value…
CID#1403006.
Diffstat (limited to '')
-rw-r--r-- | src/test/test-alloc-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-alloc-util.c b/src/test/test-alloc-util.c index cf69436d26..71ecda0b99 100644 --- a/src/test/test-alloc-util.c +++ b/src/test/test-alloc-util.c @@ -139,7 +139,7 @@ static void test_auto_erase_memory(void) { assert_se(p1 = new(uint8_t, 1024)); assert_se(p2 = new(uint8_t, 1024)); - genuine_random_bytes(p1, 1024, RANDOM_BLOCK); + assert_se(genuine_random_bytes(p1, 1024, RANDOM_BLOCK) == 0); /* before we exit the scope, do something with this data, so that the compiler won't optimize this away */ memcpy(p2, p1, 1024); |