From: Lennart Poettering Date: Tue, 18 Jun 2019 10:41:31 +0000 (+0200) Subject: tmpfiles: merge two nested if checks into one X-Git-Tag: v243-rc1~268^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20b6bb9560e6e9afb2688faea5324e8d192666be;p=thirdparty%2Fsystemd.git tmpfiles: merge two nested if checks into one --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index a3c6847de0d..321edb3034f 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)) {