]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredumpctl: drop unnecessary NULL initialization, and use const where possible ...
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Mar 2018 10:46:08 +0000 (11:46 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 21 Mar 2018 10:46:08 +0000 (11:46 +0100)
src/coredump/coredumpctl.c

index 2f8b9b7cbfc0a0b81355f6ba30833b495fb6990c..62bcbb6be3acc35366f858e6e8201c253ab06efd 100644 (file)
@@ -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;
 }