chiark / gitweb /
Add set_consume which always takes ownership
[elogind.git] / src / readahead / readahead-collect.c
index 75ec5b70c72ab0435dee6430962a8605747c18ad..ccd8408c1bd5e3dacd9a0fe32893f8907225bbe6 100644 (file)
@@ -479,8 +479,9 @@ static int collect(const char *root) {
                                         }
                                         entry->bin = (entrytime - starttime) / 2000000;
 
-                                        if ((k = hashmap_put(files, p, entry)) < 0) {
-                                                log_warning("set_put() failed: %s", strerror(-k));
+                                        k = hashmap_put(files, p, entry);
+                                        if (k < 0) {
+                                                log_warning("hashmap_put() failed: %s", strerror(-k));
                                                 free(p);
                                         }
                                 }