mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
test-alloc-util: assert on the return value to appease coverity
Coverity is right that we should check the return value… CID#1403006.
This commit is contained in:
parent
0121d1f28d
commit
67da2cc883
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user