From: Zbigniew Jędrzejewski-Szmek Date: Sat, 3 Aug 2019 15:43:51 +0000 (+0200) Subject: sd-hwdb: use return value from ordered_hashmap_iterate() X-Git-Tag: v243-rc2~66^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d276aa2011e67afb3b2cf411d5bc1695e7b4027;p=thirdparty%2Fsystemd.git sd-hwdb: use return value from ordered_hashmap_iterate() Why not? Coverity CID#1402329. --- diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c index 79fe1a83a71..58124abd21d 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;