When calculating the maximum of unsigned values, use unsigned variable

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-03 17:06:59 -07:00
parent eaf6d56487
commit d211bc55be

2
dive.c
View file

@ -726,7 +726,7 @@ static void fixup_meandepth(struct dive *dive)
static void fixup_duration(struct dive *dive)
{
struct divecomputer *dc;
int duration = 0;
unsigned int duration = 0;
for_each_dc(dive, dc)
duration = MAX(duration, dc->duration.seconds);