]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgrulesengd: Fix improper indentation warning
authorTom Hromatka <tom.hromatka@oracle.com>
Sun, 5 Jan 2020 22:46:02 +0000 (15:46 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 8 Jan 2020 15:01:39 +0000 (08:01 -0700)
This commit fixes the following warning:

cgrulesengd.c: In function ‘cgre_parse_syslog_facility’:
cgrulesengd.c:1015:5: warning: this ‘if’ clause does not guard...
    [-Wmisleading-indentation]
    1015 |     if (strlen(arg) > 1)
         |     ^~
cgrulesengd.c:1018:2: note: ...this statement, but the latter is
    misleadingly indented as if it were guarded by the ‘if’
    1018 |  switch (arg[0]) {
         |  ^~~~~~

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/daemon/cgrulesengd.c

index 0d90b8b114b81f2a80a855268a67dc091243ee8f..5efc00eb9aed6d4745cb953b6f9b261bb8d8a7ea 100644 (file)
@@ -1009,11 +1009,11 @@ void cgre_catch_term(int signum)
  */
 static int cgre_parse_syslog_facility(const char *arg)
 {
-    if (arg == NULL)
-       return 0;
+       if (arg == NULL)
+               return 0;
 
-    if (strlen(arg) > 1)
-       return 0;
+       if (strlen(arg) > 1)
+               return 0;
 
        switch (arg[0]) {
        case '0':