Don't iterate over the dive_table to discover the number of dives

dive_table.nr is exactly that.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-01-08 15:32:42 -02:00 committed by Dirk Hohndel
parent dec2572ec6
commit a809eec853

View file

@ -13,12 +13,7 @@ int getTotalWork(print_options *printOptions)
// but don't return 0 as we might divide by this number
return amount_selected ? amount_selected : 1;
}
int dives = 0, i;
struct dive *dive;
for_each_dive (i, dive) {
dives++;
}
return dives;
return dive_table.nr;
}
void find_all_templates()