summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-01-15 19:54:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 09:34:50 +0700
commit33391a77e9385cf403c2fb1b191b443fcf373294 (patch)
treef6f96b987f90419d4a2d6cfdec2f633d09252a07 /dive.c
parentdca59f06d70bd36d10704a08f8444152a82e99b8 (diff)
downloadsubsurface-33391a77e9385cf403c2fb1b191b443fcf373294.tar.gz
Convert the C code to using stdbool and true/false
Earlier we converted the C++ code to using true/false, and this converts the C code to using the same style. We already depended on stdbool.h in subsurfacestartup.[ch], and we build with -std=gnu99 so nobody could build subsurface without a c99 compiler. [Dirk Hohndel: small change suggested by Thiago Macieira: don't include stdbool.h for C++] Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dive.c b/dive.c
index 7d62616b6..455b1288c 100644
--- a/dive.c
+++ b/dive.c
@@ -570,12 +570,12 @@ static void sanitize_cylinder_info(struct dive *dive)
static bool is_potentially_redundant(struct event *event)
{
if (!strcmp(event->name, "gaschange"))
- return FALSE;
+ return false;
if (!strcmp(event->name, "bookmark"))
- return FALSE;
+ return false;
if (!strcmp(event->name, "heading"))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/* match just by name - we compare the details in the code that uses this helper */
@@ -760,7 +760,7 @@ static void fixup_dc_events(struct divecomputer *dc)
if (prev && prev->value == event->value &&
prev->flags == event->flags &&
event->time.seconds - prev->time.seconds < 61)
- event->deleted = TRUE;
+ event->deleted = true;
}
event = event->next;
}
@@ -1053,7 +1053,7 @@ add_sample_b:
if (as->stopdepth.mm)
sample.stopdepth = as->stopdepth;
if (as->in_deco)
- sample.in_deco = TRUE;
+ sample.in_deco = true;
merge_one_sample(&sample, at, res);