summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-12 17:43:33 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-12 17:43:33 +0200
commit25d042e81516246b1ebf706a57c47ac19abb0b8a (patch)
treeba18a3414782cfd4170e4d9a8bbb0a5342738d8c
parent41e5171419f5f9c08a338ea8b2ab8ea89c23c4ab (diff)
journal: fix missing variable initialization
-rw-r--r--src/journal/journal-send.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index 4c9753cec1..7a948a7ed1 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
@@ -97,7 +97,7 @@ _public_ int sd_journal_printv(int priority, const char *format, va_list ap) {
}
static int fill_iovec_sprintf(const char *format, va_list ap, int extra, struct iovec **_iov) {
- int r, n = 0, i, j;
+ int r, n = 0, i = 0, j;
struct iovec *iov = NULL;
int saved_errno;
@@ -113,8 +113,7 @@ static int fill_iovec_sprintf(const char *format, va_list ap, int extra, struct
}
i = extra;
- } else
- i = 0;
+ }
while (format) {
struct iovec *c;