]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/env-file: inline one variable declaration
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Mar 2022 17:29:03 +0000 (18:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Mar 2022 09:22:20 +0000 (10:22 +0100)
src/basic/env-file.c

index 599b73bc22a68387d1a8298aecb5954113e4c2b3..e268c5c644a254d9836950b45fa824eba86a8367 100644 (file)
@@ -23,7 +23,6 @@ static int parse_env_file_internal(
         size_t n_key = 0, n_value = 0, last_value_whitespace = SIZE_MAX, last_key_whitespace = SIZE_MAX;
         _cleanup_free_ char *contents = NULL, *key = NULL, *value = NULL;
         unsigned line = 1;
-        char *p;
         int r;
 
         enum {
@@ -46,7 +45,7 @@ static int parse_env_file_internal(
         if (r < 0)
                 return r;
 
-        for (p = contents; *p; p++) {
+        for (char *p = contents; *p; p++) {
                 char c = *p;
 
                 switch (state) {