chiark / gitweb /
log.h: new log_oom() -> int -ENOMEM, use it
[elogind.git] / src / cgtop / cgtop.c
index f988adb363f5d428828241396d8896fa3e176d54..f0ca83fd453dc99a20dca5d495d58509eeb8e966 100644 (file)
@@ -310,7 +310,7 @@ static int refresh_one(
                 if (r <= 0)
                         goto finish;
 
-                p = join(path, "/", fn, NULL);
+                p = strjoin(path, "/", fn, NULL);
                 free(fn);
 
                 if (!p) {
@@ -608,8 +608,7 @@ int main(int argc, char *argv[]) {
         a = hashmap_new(string_hash_func, string_compare_func);
         b = hashmap_new(string_hash_func, string_compare_func);
         if (!a || !b) {
-                log_error("Out of memory");
-                r = -ENOMEM;
+                r = log_oom();
                 goto finish;
         }