From: Lennart Poettering Date: Wed, 21 Mar 2018 10:46:08 +0000 (+0100) Subject: coredumpctl: drop unnecessary NULL initialization, and use const where possible ... X-Git-Tag: v239~516 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43bfe750327771465ba185c827e58ae4b542cbf2;p=thirdparty%2Fsystemd.git coredumpctl: drop unnecessary NULL initialization, and use const where possible (#8515) --- 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; }