diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-01-15 19:54:41 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-16 09:34:50 +0700 |
commit | 33391a77e9385cf403c2fb1b191b443fcf373294 (patch) | |
tree | f6f96b987f90419d4a2d6cfdec2f633d09252a07 /dive.c | |
parent | dca59f06d70bd36d10704a08f8444152a82e99b8 (diff) | |
download | subsurface-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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); |