chiark / gitweb /
tmpfiles: move exclamation mark into right place
authorLukas Nykryn <lnykryn@redhat.com>
Fri, 1 Mar 2013 17:29:59 +0000 (18:29 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 4 Mar 2013 01:16:57 +0000 (20:16 -0500)
Unary not has higher precedence than comparisons,
so the condition was bogus.

src/tmpfiles/tmpfiles.c

index 6b3f70e071e17a10f9cc91a4da8688e1681e5a37..7da94ed57b80dc5a1650184e10663f8daf8de24e 100644 (file)
@@ -321,7 +321,7 @@ static int dir_cleanup(
                         if (age >= cutoff)
                                 continue;
 
-                        if (!i->type == IGNORE_DIRECTORY_PATH || !streq(dent->d_name, p)) {
+                        if (i->type != IGNORE_DIRECTORY_PATH || !streq(dent->d_name, p)) {
                                 log_debug("rmdir '%s'\n", sub_path);
 
                                 if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0) {