chiark / gitweb /
systemctl: Fix wrong assertion test
[elogind.git] / src / journal / coredump.c
index fcd0d1e625e782cb543e1b1b7d8599de4d024b6e..c989be9b82e96a1607260bff07b036e5eb7e9bd1 100644 (file)
@@ -205,7 +205,7 @@ int main(int argc, char* argv[]) {
                         IOVEC_SET_STRING(iovec[j++], core_exe);
         }
 
-        if (get_process_cmdline(pid, LINE_MAX, false, &t) >= 0) {
+        if (get_process_cmdline(pid, 0, false, &t) >= 0) {
                 core_cmdline = strappend("COREDUMP_CMDLINE=", t);
                 free(t);
 
@@ -239,8 +239,7 @@ int main(int argc, char* argv[]) {
 
         p = malloc(9 + COREDUMP_MAX);
         if (!p) {
-                log_error("Out of memory");
-                r = -ENOMEM;
+                r = log_oom();
                 goto finish;
         }