chiark / gitweb /
sd-network: split the operstate 'unknown' into 'down' and 'up'
[elogind.git] / src / journal / coredump.c
index 182c2b1bad1e0f31d211fa99160067c00b23bc41..db51098d9cfbb97927d66ef46a7d2042eb4d8ff0 100644 (file)
@@ -26,8 +26,8 @@
 #include <sys/types.h>
 #include <sys/xattr.h>
 
-#include <systemd/sd-journal.h>
-#include <systemd/sd-login.h>
+#include "systemd/sd-journal.h"
+#include "systemd/sd-login.h"
 
 #include "log.h"
 #include "util.h"
@@ -591,9 +591,9 @@ int main(int argc, char* argv[]) {
         }
 
         if (sd_pid_get_owner_uid(pid, &owner_uid) >= 0) {
-                asprintf(&core_owner_uid, "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
-
-                if (core_owner_uid)
+                r = asprintf(&core_owner_uid,
+                             "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
+                if (r > 0)
                         IOVEC_SET_STRING(iovec[j++], core_owner_uid);
         }