chiark / gitweb /
systemctl: fix enable/disable reply handling
[elogind.git] / src / journal / catalog.c
index 7681af66299b18370bed94f6e6c324a7170631aa..90ca00806448b3282df1f6bddf63554524255fc6 100644 (file)
@@ -277,7 +277,7 @@ static long write_catalog(const char *database, Hashmap *h, struct strbuf *sb,
         CatalogHeader header;
         _cleanup_fclose_ FILE *w = NULL;
         int r;
-        char _cleanup_free_ *d, *p = NULL;
+        _cleanup_free_ char *d, *p = NULL;
         size_t k;
 
         d = dirname_malloc(database);
@@ -399,7 +399,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
         }
 
         assert(n == hashmap_size(h));
-        qsort(items, n, sizeof(CatalogItem), catalog_compare_func);
+        qsort_safe(items, n, sizeof(CatalogItem), catalog_compare_func);
 
         r = write_catalog(database, h, sb, items, n);
         if (r < 0)
@@ -627,7 +627,7 @@ int catalog_list_items(FILE *f, const char *database, bool oneline, char **items
         STRV_FOREACH(item, items) {
                 sd_id128_t id;
                 int k;
-                char _cleanup_free_ *msg = NULL;
+                _cleanup_free_ char *msg = NULL;
 
                 k = sd_id128_from_string(*item, &id);
                 if (k < 0) {