X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=statistics.c;h=9510030d717655e06b1104474814429e2af3ef07;hb=43530d397bd8d754202d0e97d13c32c1f0685f01;hp=4c637944329f8e3bea52257909c6f7f666acca16;hpb=66c04f4f47f1f8fc55b3cc81df67acac1aa72b8f;p=ext%2Fsubsurface.git diff --git a/statistics.c b/statistics.c index 4c63794..9510030 100644 --- a/statistics.c +++ b/statistics.c @@ -169,12 +169,9 @@ void show_dive_stats(struct dive *dive) start = cyl->start.mbar ? : cyl->sample_start.mbar; end = cyl->end.mbar ? : cyl->sample_end.mbar; - /* we assume that every valid cylinder has either a working pressure - * or a size; but for good measure let's also accept cylinders with - * a starting or ending pressure*/ - if (cyl->type.workingpressure.mbar || cyl->type.size.mliter || start || end) { + if (!cylinder_none(cyl)) { /* 0% O2 strangely means air, so 21% - I don't like that at all */ - int o2 = cyl->gasmix.o2.permille ? : 209; + int o2 = cyl->gasmix.o2.permille ? : AIR_PERMILLE; if (offset > 0) { snprintf(buf+offset, 80-offset, ", "); offset += 2;