From 43bfe750327771465ba185c827e58ae4b542cbf2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Mar 2018 11:46:08 +0100 Subject: [PATCH] coredumpctl: drop unnecessary NULL initialization, and use const where possible (#8515) --- src/coredump/coredumpctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 2f8b9b7cbfc..62bcbb6be3a 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -67,8 +67,7 @@ static bool arg_quiet = false; static int add_match(sd_journal *j, const char *match) { _cleanup_free_ char *p = NULL; - char *pattern = NULL; - const char* prefix; + const char* prefix, *pattern; pid_t pid; int r; @@ -91,6 +90,7 @@ static int add_match(sd_journal *j, const char *match) { r = sd_journal_add_match(j, pattern, 0); if (r < 0) return log_error_errno(r, "Failed to add match \"%s\": %m", match); + return 0; } -- 2.47.3