Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
void update_cylinder_related_info(struct dive *dive)
{
- if(dive != NULL) {
+ if (dive != NULL) {
dive->sac = calculate_sac(dive);
dive->otu = calculate_otu(dive);
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cylinder->pressure_button))) {
start = gtk_spin_button_get_value(GTK_SPIN_BUTTON(cylinder->start));
end = gtk_spin_button_get_value(GTK_SPIN_BUTTON(cylinder->end));
- } else
+ } else {
start = end = 0;
+ }
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cylinder->gasmix_button)))
o2 = gtk_spin_button_get_value(GTK_SPIN_BUTTON(cylinder->o2))*10 + 0.5;
else