]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/random-util.c
build-sys: use #if Y instead of #ifdef Y everywhere
[thirdparty/systemd.git] / src / basic / random-util.c
index 42f484d68794201ef97b13bb905db40f55c7e00a..146c8f55ed14dafc781000818e812ac5f703b9b8 100644 (file)
 #include <linux/random.h>
 #include <stdint.h>
 
-#ifdef HAVE_SYS_AUXV_H
+#if HAVE_SYS_AUXV_H
 #  include <sys/auxv.h>
 #endif
 
-#ifdef USE_SYS_RANDOM_H
+#if USE_SYS_RANDOM_H
 #  include <sys/random.h>
 #else
 #  include <linux/random.h>
@@ -100,14 +100,14 @@ int acquire_random_bytes(void *p, size_t n, bool high_quality_required) {
 void initialize_srand(void) {
         static bool srand_called = false;
         unsigned x;
-#ifdef HAVE_SYS_AUXV_H
+#if HAVE_SYS_AUXV_H
         void *auxv;
 #endif
 
         if (srand_called)
                 return;
 
-#ifdef HAVE_SYS_AUXV_H
+#if HAVE_SYS_AUXV_H
         /* The kernel provides us with 16 bytes of entropy in auxv, so let's
          * try to make use of that to seed the pseudo-random generator. It's
          * better than nothing... */