diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-06-18 12:41:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-06-18 12:41:31 +0200 |
commit | 20b6bb9560e6e9afb2688faea5324e8d192666be (patch) | |
tree | 3d00ad50c70cd95484196e4e26ceac43caafc3d9 /src/tmpfiles | |
parent | 113ed3be37ef788497ed3b84a792099441b94da4 (diff) | |
download | systemd-20b6bb9560e6e9afb2688faea5324e8d192666be.tar.gz systemd-20b6bb9560e6e9afb2688faea5324e8d192666be.tar.bz2 systemd-20b6bb9560e6e9afb2688faea5324e8d192666be.zip |
tmpfiles: merge two nested if checks into one
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index a3c6847de0..321edb3034 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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)) { |