diff --git a/core/divelist.c b/core/divelist.c index 8886d7ce2..ac0af1b18 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -49,15 +49,10 @@ void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2max_p) maxo2 = o2; if (o2 < mino2 && maxhe <= 0) mino2 = o2; - if (he > maxhe) - goto newmax; - if (he < maxhe) - continue; - if (o2 <= maxo2) - continue; - newmax: - maxhe = he; - mino2 = o2; + if (he > maxhe) { + maxhe = he; + mino2 = o2; + } } /* All air? Show/sort as "air"/zero */ if ((!maxhe && maxo2 == O2_IN_AIR && mino2 == maxo2) ||