]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysctl-util: per coding style, compare chars explicit against 0.
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2021 07:23:56 +0000 (09:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2021 14:32:40 +0000 (16:32 +0200)
src/basic/sysctl-util.c

index 4e168dd48a16f165813cdbdf70e1b3fc8dc272c1..bb01d09696d03ba2ec43eeb1c9c38de2691e197a 100644 (file)
@@ -38,7 +38,7 @@ char *sysctl_normalize(char *s) {
         path_simplify(s);
 
         /* Kill the leading slash, but keep the first character of the string in the same place. */
-        if (*s == '/' && *(s+1))
+        if (s[0] == '/' && s[1] != 0)
                 memmove(s, s+1, strlen(s));
 
         return s;