1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

test: hashmap-plain - make coverity happy

Check return value of hashmap_ensure_allocated().

CID#1250807.
This commit is contained in:
Tom Gundersen 2014-11-04 16:20:22 +01:00
parent 696c24fced
commit 61c8175021

View File

@ -246,7 +246,7 @@ static void test_hashmap_put(void) {
int valid_hashmap_put;
void *val1 = (void*) "val 1";
hashmap_ensure_allocated(&m, &string_hash_ops);
assert_se(hashmap_ensure_allocated(&m, &string_hash_ops) >= 0);
assert_se(m);
valid_hashmap_put = hashmap_put(m, "key 1", val1);