summaryrefslogtreecommitdiff
path: root/src/journal/coredump.c
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2015-03-27 12:02:49 +0100
committerHarald Hoyer <harald@redhat.com>2015-03-27 14:57:38 +0100
commita7f7d1bde43fc825c49afea3f946f5b4b3d563e0 (patch)
treee6202adf568f95dbf22d7fb0c51f8c9220a56964 /src/journal/coredump.c
parent47d45d3cde45d6545367570264e4e3636bc9e345 (diff)
fix gcc warnings about uninitialized variables
like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
Diffstat (limited to 'src/journal/coredump.c')
-rw-r--r--src/journal/coredump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 6357d3e277..4e23e487fb 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -242,7 +242,7 @@ static int maybe_remove_external_coredump(const char *filename, off_t size) {
static int make_filename(const char *info[_INFO_LEN], char **ret) {
_cleanup_free_ char *c = NULL, *u = NULL, *p = NULL, *t = NULL;
- sd_id128_t boot;
+ sd_id128_t boot = {};
int r;
assert(info);
@@ -841,7 +841,7 @@ log:
/* Optionally store the entire coredump in the journal */
if (IN_SET(arg_storage, COREDUMP_STORAGE_JOURNAL, COREDUMP_STORAGE_BOTH) &&
coredump_size <= (off_t) arg_journal_size_max) {
- size_t sz;
+ size_t sz = 0;
/* Store the coredump itself in the journal */