chiark / gitweb /
journal: fix sd_journal_stream_fd()
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Jun 2012 22:19:13 +0000 (00:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Jun 2012 22:19:13 +0000 (00:19 +0200)
src/journal/journal-send.c
src/journal/journald.c
src/readahead/readahead-analyze.c

index 7a948a7ed151cea994a5b2a3956a7bb92314beb0..bc44828e1c0e0ea724d496d397d6fa6f5928e178 100644 (file)
@@ -375,10 +375,11 @@ _public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
                 identifier = "";
 
         l = strlen(identifier);
-        header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
+        header = alloca(l + 1 + 1 + 2 + 2 + 2 + 2 + 2);
 
         memcpy(header, identifier, l);
         header[l++] = '\n';
+        header[l++] = '\n';
         header[l++] = '0' + priority;
         header[l++] = '\n';
         header[l++] = '0' + !!level_prefix;
index 619a98d1f2db252bef61193d3812ea6bbffe63a2..5c6c4cae9ea9d50141610a09803f315d46964485 100644 (file)
@@ -460,7 +460,8 @@ static void dispatch_message_real(
                 struct iovec *iovec, unsigned n, unsigned m,
                 struct ucred *ucred,
                 struct timeval *tv,
-                const char *label, size_t label_len, const char *unit_id) {
+                const char *label, size_t label_len,
+                const char *unit_id) {
 
         char *pid = NULL, *uid = NULL, *gid = NULL,
                 *source_time = NULL, *boot_id = NULL, *machine_id = NULL,
index fb50ad371e8da1d2b7fba01a9e0a9eb505d2930a..8f1d7f9c4fa188442c67585c47e88bf0660361df 100644 (file)
@@ -143,7 +143,6 @@ int main_analyze(const char *pack_path) {
 
         return EXIT_SUCCESS;
 
-
 fail:
         fclose(pack);
         return EXIT_FAILURE;