diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-05-15 07:42:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-15 07:42:14 -0700 |
commit | 2feedf46fa86c19095a9f302d1d7a44d3416384d (patch) | |
tree | c5555f630309bc6808acbf7b3957346e745dcb65 /core | |
parent | 1bdf00b2b472078a0b24f1c269782d822cb96e02 (diff) | |
download | subsurface-2feedf46fa86c19095a9f302d1d7a44d3416384d.tar.gz |
Cleanup: small coding style fixes
And addressing a cut and paste error in a comment.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/datatrak.c | 4 | ||||
-rw-r--r-- | core/deco.c | 3 | ||||
-rw-r--r-- | core/dive.c | 2 | ||||
-rw-r--r-- | core/divelist.c | 6 |
4 files changed, 6 insertions, 9 deletions
diff --git a/core/datatrak.c b/core/datatrak.c index 553f0da05..5e806f08f 100644 --- a/core/datatrak.c +++ b/core/datatrak.c @@ -65,9 +65,9 @@ static char *to_utf8(unsigned char *in_string) char *out_string = calloc(outlen, 1); for (i = 0; i < inlen; i++) { - if (in_string[i] < 127) + if (in_string[i] < 127) { out_string[j] = in_string[i]; - else { + } else { if (in_string[i] > 127 && in_string[i] <= 173) in_string[i] = to_8859(in_string[i]); out_string[j] = (in_string[i] >> 6) | 0xC0; diff --git a/core/deco.c b/core/deco.c index b60a787b5..57efc5878 100644 --- a/core/deco.c +++ b/core/deco.c @@ -461,8 +461,7 @@ void calc_crushing_pressure(struct deco_state *ds, double pressure) if (gradient <= vpmb_config.gradient_of_imperm) { // permeable situation n2_crushing_pressure = he_crushing_pressure = gradient; ds->crushing_onset_tension[ci] = gas_tension; - } - else { // impermeable + } else { // impermeable if (ds->max_ambient_pressure >= pressure) return; diff --git a/core/dive.c b/core/dive.c index d20350a80..ed0c5a757 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1340,7 +1340,7 @@ static void fixup_surface_pressure(struct dive *dive) /* if the surface pressure in the dive data is redundant to the calculated * value (i.e., it was added by running fixup on the dive) return 0, - * otherwise return the air temperature given in the dive */ + * otherwise return the surface pressure given in the dive */ pressure_t un_fixup_surface_pressure(const struct dive *d) { pressure_t res = d->surface_pressure; diff --git a/core/divelist.c b/core/divelist.c index 9ae87a328..bd29b9fda 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -582,8 +582,7 @@ int init_decompression(struct deco_state *ds, struct dive *dive) printf("Tissues after init:\n"); dump_tissues(ds); #endif - } - else { + } else { surface_time = pdive->when - last_endtime; if (surface_time < 0) { #if DECO_CALC_DEBUG & 2 @@ -620,8 +619,7 @@ int init_decompression(struct deco_state *ds, struct dive *dive) printf("Tissues after no previous dive, surface time set to 48h:\n"); dump_tissues(ds); #endif - } - else { + } else { surface_time = dive->when - last_endtime; if (surface_time < 0) { #if DECO_CALC_DEBUG & 2 |