Skip to content

Commit 5d276aa

Browse files
committed
sd-hwdb: use return value from ordered_hashmap_iterate()
Why not? Coverity CID#1402329.
1 parent bc67342 commit 5d276aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libsystemd/sd-hwdb/sd-hwdb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,7 @@ _public_ int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **val
457457
if (hwdb->properties_modified)
458458
return -EAGAIN;
459459

460-
ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, (void **)&entry, &k);
461-
if (!k)
460+
if (!ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, (void **)&entry, &k))
462461
return 0;
463462

464463
*key = k;

0 commit comments

Comments
 (0)