systemd/0008-journal-upload-make-su...

23 lines
785 B
Diff

From e1ad6e245dcf63faa8f183063eb97678f4f9ac94 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Wed, 20 Aug 2014 15:13:06 +0200
Subject: [PATCH] journal-upload: make sure that 'r' is initialized
---
src/journal-remote/journal-upload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 7a7aee8170..bdeeff6778 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -324,7 +324,7 @@ static int dispatch_fd_input(sd_event_source *event,
}
static int open_file_for_upload(Uploader *u, const char *filename) {
- int fd, r;
+ int fd, r = 0;
if (streq(filename, "-"))
fd = STDIN_FILENO;