chiark / gitweb /
journal: systemd v38 fails to build on big-endians
[elogind.git] / src / journal / journald.c
index 53dbf8e138a65dc06841d65da365f5845648988f..f63a12fae86b656291a383152943b2337ef4afa7 100644 (file)
@@ -489,7 +489,7 @@ static void dispatch_message_real(Server *s,
                         exe = strappend("_EXE=", t);
                         free(t);
 
-                        if (comm)
+                        if (exe)
                                 IOVEC_SET_STRING(iovec[n++], exe);
                 }
 
@@ -1405,10 +1405,14 @@ static int stdout_stream_line(StdoutStream *s, char *p) {
         switch (s->state) {
 
         case STDOUT_STREAM_IDENTIFIER:
-                s->identifier = strdup(p);
-                if (!s->identifier) {
-                        log_error("Out of memory");
-                        return -ENOMEM;
+                if (isempty(p))
+                        s->identifier = NULL;
+                else  {
+                        s->identifier = strdup(p);
+                        if (!s->identifier) {
+                                log_error("Out of memory");
+                                return -ENOMEM;
+                        }
                 }
 
                 s->state = STDOUT_STREAM_PRIORITY;