summaryrefslogtreecommitdiffstats
path: root/Affinity.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2021-03-20 11:21:20 +0100
committercgzones <cgzones@googlemail.com>2021-03-21 21:49:04 +0100
commit57e0ce7b4ffce8cf41bd3003831198d0bb38ebf2 (patch)
treefb8d84bb5068ba69535ce759766ab498916894d4 /Affinity.c
parent1cb3aee07a5be99dff3407ff9b5de0d63b330177 (diff)
Use `#if defined()` syntax when `#elif defined()` is present
This prefers the `#if defined()` syntax over the `#ifdef` variant whenever there's also a `#elif defined()` clause, thus making the multiple branching structure more obvious and the overall use more consistent.
Diffstat (limited to 'Affinity.c')
-rw-r--r--Affinity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Affinity.c b/Affinity.c
index ee6eb519..5a73793b 100644
--- a/Affinity.c
+++ b/Affinity.c
@@ -14,7 +14,7 @@ in the source distribution for its full text.
#include "XUtils.h"
-#ifdef HAVE_LIBHWLOC
+#if defined(HAVE_LIBHWLOC)
#include <hwloc.h>
#include <hwloc/bitmap.h>
#ifdef __linux__
@@ -50,7 +50,7 @@ void Affinity_add(Affinity* this, unsigned int id) {
}
-#ifdef HAVE_LIBHWLOC
+#if defined(HAVE_LIBHWLOC)
Affinity* Affinity_get(const Process* proc, ProcessList* pl) {
hwloc_cpuset_t cpuset = hwloc_bitmap_alloc();

© 2014-2024 Faster IT GmbH | imprint | privacy policy