summaryrefslogtreecommitdiff
path: root/lib/verify.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-06-15 16:16:37 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-06-15 16:24:51 +0300
commit48d0fa954ca1629ffb0092b9c00555570241d6a0 (patch)
tree4ef09f061400e41b78eaf74e37d6d2611325f414 /lib/verify.c
parent9ca1077c3854967c88ac70082c8b5d392d0c3cdf (diff)
downloadrpm-48d0fa954ca1629ffb0092b9c00555570241d6a0.tar.gz
Test for preprocessor definition rather than value consistently everywhere
This is not supposed to actually change anything as such but inconsistency is bad and causes other kinds of headaches.
Diffstat (limited to 'lib/verify.c')
-rw-r--r--lib/verify.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/verify.c b/lib/verify.c
index 66647e96e..154274593 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -7,10 +7,10 @@
#include <errno.h>
#include <fcntl.h>
-#if WITH_CAP
+#ifdef WITH_CAP
#include <sys/capability.h>
#endif
-#if WITH_ACL
+#ifdef WITH_ACL
#include <acl/libacl.h>
#endif
@@ -33,7 +33,7 @@
#define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
/* If cap_compare() (Linux extension) not available, do it the hard way */
-#if WITH_CAP && !defined(HAVE_CAP_COMPARE)
+#if defined(WITH_CAP) && !defined(HAVE_CAP_COMPARE)
static int cap_compare(cap_t acap, cap_t bcap)
{
int rc = 0;
@@ -176,7 +176,7 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask)
if (metamode != filemode)
vfy |= RPMVERIFY_MODE;
-#if WITH_ACL
+#ifdef WITH_ACL
/*
* For now, any non-default acl's on a file is a difference as rpm
* cannot have set them.
@@ -204,7 +204,7 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask)
}
}
-#if WITH_CAP
+#ifdef WITH_CAP
if (flags & RPMVERIFY_CAPS) {
cap_t cap = NULL;
cap_t fcap = cap_get_file(fn);