chiark / gitweb /
missing: use btrfs.h instead of defining our own btrfs structures
[elogind.git] / src / readahead / readahead-collect.c
index 75ec5b70c72ab0435dee6430962a8605747c18ad..658c230d65e985cbdd43a753ac3f2a515562110d 100644 (file)
@@ -38,6 +38,7 @@
 #include <sys/mman.h>
 #include <linux/fs.h>
 #include <linux/fiemap.h>
+#include <linux/btrfs.h>
 #include <sys/ioctl.h>
 #include <sys/vfs.h>
 #include <getopt.h>
@@ -479,8 +480,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);
                                         }
                                 }