chiark / gitweb /
hashmap: introduce hash_ops to make struct Hashmap smaller
[elogind.git] / src / libsystemd / sd-bus / busctl.c
index b6839c13e73f84321c1b3568d956fe901428f4fb..f06b74505b478d4a34ce3691d2fe07c26f8f100e 100644 (file)
@@ -76,7 +76,7 @@ static int list_bus_names(sd_bus *bus, char **argv) {
 
         pager_open_if_enabled();
 
-        names = hashmap_new(string_hash_func, string_compare_func);
+        names = hashmap_new(&string_hash_ops);
         if (!names)
                 return log_oom();
 
@@ -482,7 +482,7 @@ static int busctl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_parse_environment();