summaryrefslogtreecommitdiff
path: root/rts/RetainerSet.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-21 09:16:48 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-28 22:35:04 -0400
commit945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch)
treeae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /rts/RetainerSet.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/RetainerSet.c')
-rw-r--r--rts/RetainerSet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c
index 9c3043b84a..58080970e9 100644
--- a/rts/RetainerSet.c
+++ b/rts/RetainerSet.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifdef PROFILING
+#if defined(PROFILING)
#include "PosixSource.h"
#include "Rts.h"
@@ -78,7 +78,7 @@ initializeAllRetainerSet(void)
void
refreshAllRetainerSet(void)
{
-#ifdef FIRST_APPROACH
+#if defined(FIRST_APPROACH)
int i;
// first approach: completely refresh
@@ -145,7 +145,7 @@ addElement(retainer r, RetainerSet *rs)
RetainerSet *nrs; // New Retainer Set
StgWord hk; // Hash Key
-#ifdef DEBUG_RETAINER
+#if defined(DEBUG_RETAINER)
// debugBelch("addElement(%p, %p) = ", r, rs);
#endif
@@ -185,7 +185,7 @@ addElement(retainer r, RetainerSet *rs)
if (rs->element[i] != nrs->element[i + 1]) break;
if (i < rs->num) continue;
-#ifdef DEBUG_RETAINER
+#if defined(DEBUG_RETAINER)
// debugBelch("%p\n", nrs);
#endif
// The set we are seeking already exists!
@@ -208,7 +208,7 @@ addElement(retainer r, RetainerSet *rs)
hashTable[hash(hk)] = nrs;
-#ifdef DEBUG_RETAINER
+#if defined(DEBUG_RETAINER)
// debugBelch("%p\n", nrs);
#endif
return nrs;
@@ -245,7 +245,7 @@ printRetainer(FILE *f, retainer cc)
* printRetainerSetShort() should always display the same output for
* a given retainer set regardless of the time of invocation.
* -------------------------------------------------------------------------- */
-#ifdef SECOND_APPROACH
+#if defined(SECOND_APPROACH)
#if defined(RETAINER_SCHEME_INFO)
// Retainer scheme 1: retainer = info table
void
@@ -411,7 +411,7 @@ printRetainerSetShort(FILE *f, retainerSet *rs, uint32_t max_length)
* of the run, so the user can find out for a given retainer set ID
* the full contents of that set.
* -------------------------------------------------------------------------- */
-#ifdef SECOND_APPROACH
+#if defined(SECOND_APPROACH)
void
outputAllRetainerSet(FILE *prof_file)
{