summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-22 00:19:13 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-22 00:19:13 +0200
commit8b38f3cc3eb73adf9536cb73d0f319e60d42ea0c (patch)
treeb781c89f8171aed30be339e9dff3fc5a4c04c8c5
parent62bca2c657bf95fd1f69935eef09915afa5c69d9 (diff)
journal: fix sd_journal_stream_fd()
-rw-r--r--src/journal/journal-send.c3
-rw-r--r--src/journal/journald.c3
-rw-r--r--src/readahead/readahead-analyze.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index 7a948a7ed1..bc44828e1c 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
@@ -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;
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 619a98d1f2..5c6c4cae9e 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -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,
diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c
index fb50ad371e..8f1d7f9c4f 100644
--- a/src/readahead/readahead-analyze.c
+++ b/src/readahead/readahead-analyze.c
@@ -143,7 +143,6 @@ int main_analyze(const char *pack_path) {
return EXIT_SUCCESS;
-
fail:
fclose(pack);
return EXIT_FAILURE;