summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-08-03 17:43:51 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-08-03 17:43:51 +0200
commit5d276aa2011e67afb3b2cf411d5bc1695e7b4027 (patch)
treec925426ac7d77a690e87b223c66472aac23a3607
parentbc67342e94ce1133af6d24c2d05c6c2ee5c92bdb (diff)
downloadsystemd-5d276aa2011e67afb3b2cf411d5bc1695e7b4027.tar.gz
systemd-5d276aa2011e67afb3b2cf411d5bc1695e7b4027.tar.bz2
systemd-5d276aa2011e67afb3b2cf411d5bc1695e7b4027.zip
sd-hwdb: use return value from ordered_hashmap_iterate()
Why not? Coverity CID#1402329.
-rw-r--r--src/libsystemd/sd-hwdb/sd-hwdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index 79fe1a83a7..58124abd21 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -457,8 +457,7 @@ _public_ int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **val
if (hwdb->properties_modified)
return -EAGAIN;
- ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, (void **)&entry, &k);
- if (!k)
+ if (!ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, (void **)&entry, &k))
return 0;
*key = k;