]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: merge two nested if checks into one
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Jun 2019 10:41:31 +0000 (12:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Jun 2019 10:41:31 +0000 (12:41 +0200)
src/tmpfiles/tmpfiles.c

index a3c6847de0dcf75de4c2c77971bd5098af1c4f6e..321edb3034f306b6b0d2a80abd7b3b70f552744b 100644 (file)
@@ -656,14 +656,16 @@ static int dir_cleanup(
                                 continue;
                         }
 
-                        if (mountpoint && S_ISREG(s.st_mode))
-                                if (s.st_uid == 0 && STR_IN_SET(dent->d_name,
-                                                                ".journal",
-                                                                "aquota.user",
-                                                                "aquota.group")) {
-                                        log_debug("Skipping \"%s\".", sub_path);
-                                        continue;
-                                }
+                        if (mountpoint &&
+                            S_ISREG(s.st_mode) &&
+                            s.st_uid == 0 &&
+                            STR_IN_SET(dent->d_name,
+                                       ".journal",
+                                       "aquota.user",
+                                       "aquota.group")) {
+                                log_debug("Skipping \"%s\".", sub_path);
+                                continue;
+                        }
 
                         /* Ignore sockets that are listed in /proc/net/unix */
                         if (S_ISSOCK(s.st_mode) && unix_socket_alive(sub_path)) {