diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-07 20:33:22 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-07 20:33:22 -0800 |
commit | 37c1e8147ac96cb75f61a8bdf908db75af9037cb (patch) | |
tree | 148d95f91cc9b2e8dd9d2b93cdaaf996f140b262 /membuffer.c | |
parent | de6e7d894ebaeaa215213da6e5bc98995ce20c16 (diff) | |
download | subsurface-37c1e8147ac96cb75f61a8bdf908db75af9037cb.tar.gz |
Don't have the put_something() functions return success
We didn't use the return value anywhere.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'membuffer.c')
-rw-r--r-- | membuffer.c | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/membuffer.c b/membuffer.c index 8ba23ebe2..a222af60b 100644 --- a/membuffer.c +++ b/membuffer.c @@ -127,47 +127,32 @@ void put_milli(struct membuffer *b, const char *pre, int value, const char *post put_format(b, "%s%s%u.%s%s", pre, sign, v, buf, post); } -int put_temperature(struct membuffer *b, temperature_t temp, const char *pre, const char *post) +void put_temperature(struct membuffer *b, temperature_t temp, const char *pre, const char *post) { - if (!temp.mkelvin) - return 0; - - put_milli(b, pre, temp.mkelvin - ZERO_C_IN_MKELVIN, post); - return 1; + if (temp.mkelvin) + put_milli(b, pre, temp.mkelvin - ZERO_C_IN_MKELVIN, post); } -int put_depth(struct membuffer *b, depth_t depth, const char *pre, const char *post) +void put_depth(struct membuffer *b, depth_t depth, const char *pre, const char *post) { - if (!depth.mm) - return 0; - - put_milli(b, pre, depth.mm, post); - return 1; + if (depth.mm) + put_milli(b, pre, depth.mm, post); } -int put_duration(struct membuffer *b, duration_t duration, const char *pre, const char *post) +void put_duration(struct membuffer *b, duration_t duration, const char *pre, const char *post) { - if (!duration.seconds) - return 0; - - put_format(b, "%s%u:%02u%s", pre, FRACTION(duration.seconds, 60), post); - return 1; + if (duration.seconds) + put_format(b, "%s%u:%02u%s", pre, FRACTION(duration.seconds, 60), post); } -int put_pressure(struct membuffer *b, pressure_t pressure, const char *pre, const char *post) +void put_pressure(struct membuffer *b, pressure_t pressure, const char *pre, const char *post) { - if (!pressure.mbar) - return 0; - - put_milli(b, pre, pressure.mbar, post); - return 1; + if (pressure.mbar) + put_milli(b, pre, pressure.mbar, post); } -int put_salinity(struct membuffer *b, int salinity, const char *pre, const char *post) +void put_salinity(struct membuffer *b, int salinity, const char *pre, const char *post) { - if (!salinity) - return 0; - - put_format(b, "%s%d%s", pre, salinity / 10, post); - return 1; + if (salinity) + put_format(b, "%s%d%s", pre, salinity / 10, post); } |