]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote: inline one more iterator variable declaration
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 15 Feb 2021 18:48:09 +0000 (19:48 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Feb 2021 20:09:14 +0000 (21:09 +0100)
src/journal-remote/journal-remote-main.c

index 355a258be16c702a76e7119dcc4ec2e09b8b5597..3e84c3dd7b91cb7f7e0b32bbfc01a0587488d571 100644 (file)
@@ -977,10 +977,9 @@ static int parse_argv(int argc, char *argv[]) {
                                 return r;
                         break;
 
-                case ARG_GNUTLS_LOG: {
+                case ARG_GNUTLS_LOG:
 #if HAVE_GNUTLS
-                        const char* p = optarg;
-                        for (;;) {
+                        for (const char* p = optarg;;) {
                                 _cleanup_free_ char *word = NULL;
 
                                 r = extract_first_word(&p, &word, ",", 0);
@@ -999,7 +998,6 @@ static int parse_argv(int argc, char *argv[]) {
                         return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                "Option --gnutls-log is not available.");
 #endif
-                }
 
                 case '?':
                         return -EINVAL;