summaryrefslogtreecommitdiff
path: root/rts/Proftimer.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/Proftimer.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/Proftimer.c')
-rw-r--r--rts/Proftimer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Proftimer.c b/rts/Proftimer.c
index 0c07194ed5..eb4a932cdb 100644
--- a/rts/Proftimer.c
+++ b/rts/Proftimer.c
@@ -13,7 +13,7 @@
#include "Proftimer.h"
#include "Capability.h"
-#ifdef PROFILING
+#if defined(PROFILING)
static bool do_prof_ticks = false; // enable profiling ticks
#endif
@@ -28,7 +28,7 @@ bool performHeapProfile;
void
stopProfTimer( void )
{
-#ifdef PROFILING
+#if defined(PROFILING)
do_prof_ticks = false;
#endif
}
@@ -36,7 +36,7 @@ stopProfTimer( void )
void
startProfTimer( void )
{
-#ifdef PROFILING
+#if defined(PROFILING)
do_prof_ticks = true;
#endif
}
@@ -71,7 +71,7 @@ uint32_t total_ticks = 0;
void
handleProfTick(void)
{
-#ifdef PROFILING
+#if defined(PROFILING)
total_ticks++;
if (do_prof_ticks) {
uint32_t n;