From: Lennart Poettering Date: Thu, 12 Apr 2012 15:43:33 +0000 (+0200) Subject: journal: fix missing variable initialization X-Git-Tag: v183~350 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25d042e81516246b1ebf706a57c47ac19abb0b8a;p=systemd journal: fix missing variable initialization --- diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c index 4c9753ce..7a948a7e 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;