]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use instead of #ifdef for HAVE_*
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 29 Jun 2018 07:26:49 +0000 (16:26 +0900)
committerLennart Poettering <lennart@poettering.net>
Fri, 29 Jun 2018 09:40:15 +0000 (11:40 +0200)
src/firstboot/firstboot.c
src/resolve/resolved-dnssd.c
src/tmpfiles/tmpfiles.c

index a98e53b3a3cad30be893b87c7545d67627321132..825b67e87eedd483bb6d287817d842fff8876730 100644 (file)
@@ -4,7 +4,7 @@
 #include <getopt.h>
 #include <unistd.h>
 
-#ifdef HAVE_CRYPT_H
+#if HAVE_CRYPT_H
 /* libxcrypt is a replacement for glibc's libcrypt, and libcrypt might be
  * removed from glibc at some point. As part of the removal, defines for
  * crypt(3) are dropped from unistd.h, and we must include crypt.h instead.
index aa4bd74788f9bfba40017a0b4a19e3e6f46756d3..293a0fade4f09cef0c65c5ce6832b7302f96c6c4 100644 (file)
@@ -11,7 +11,7 @@ const char* const dnssd_service_dirs[] = {
         "/etc/systemd/dnssd",
         "/run/systemd/dnssd",
         "/usr/lib/systemd/dnssd",
-#ifdef HAVE_SPLIT_USR
+#if HAVE_SPLIT_USR
         "/lib/systemd/dnssd",
 #endif
     NULL
index 927de35f32cfaedf0ce7582533816c1e2878762f..7489bf1e6f5e1b46886884f8b868e3dc8488b9e2 100644 (file)
@@ -1052,7 +1052,7 @@ static int fd_set_acls(Item *item, int fd, const struct stat *st) {
 
 static int path_set_acls(Item *item, const char *path) {
         int r = 0;
-#ifdef HAVE_ACL
+#if HAVE_ACL
         _cleanup_close_ int fd = -1;
         struct stat st;
 
@@ -1067,9 +1067,9 @@ static int path_set_acls(Item *item, const char *path) {
                 return log_error_errno(errno, "Failed to fstat() file %s: %m", path);
 
         r = fd_set_acls(item, fd, &st);
- #endif
-         return r;
- }
+#endif
+        return r;
+}
 
 #define ATTRIBUTES_ALL                          \
         (FS_NOATIME_FL      |                   \