diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-09 09:52:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-09 09:52:59 -0800 |
commit | 9b1ea2ae6d6998aaaa842dabf1182c279f7d19f5 (patch) | |
tree | 5f41c0bfa1c471fd86b691c5f004c1d9d4b666d5 /equipment.c | |
parent | fe532a585cb0c1250cca5994a78394aadc3e14dd (diff) | |
download | subsurface-9b1ea2ae6d6998aaaa842dabf1182c279f7d19f5.tar.gz |
Use common helper function for the "no cylinder info" case
Miika fixed the statistics code that didn't properly check for the "no
cylinder info" case - this cleans it up and just uses the helper
function in equipment.c.
Rename the helper to be slightly better named while at it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'equipment.c')
-rw-r--r-- | equipment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/equipment.c b/equipment.c index 2b278934d..037e54208 100644 --- a/equipment.c +++ b/equipment.c @@ -286,7 +286,7 @@ static void show_cylinder(cylinder_t *cyl, struct cylinder_widget *cylinder) gtk_spin_button_set_value(GTK_SPIN_BUTTON(cylinder->o2), o2); } -static int cyl_nothing(cylinder_t *cyl) +int cylinder_none(cylinder_t *cyl) { return !cyl->type.size.mliter && !cyl->type.workingpressure.mbar && @@ -328,7 +328,7 @@ void show_dive_equipment(struct dive *dive) do { cylinder_t *cyl = &dive->cylinder[max-1]; - if (!cyl_nothing(cyl)) + if (!cylinder_none(cyl)) break; } while (--max); |