From 160fb321bcf0c41770464d5272ea24f1e01d50dc Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 11 Dec 2013 21:21:50 +0100 Subject: [PATCH] Close warning first might be garbage First might be garbage if get_ranges would be called when dive_table.nr == 0. This would rather signal that something else is broken, but at least we shouldn't make it worse. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- statistics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/statistics.c b/statistics.c index 0c823b1d8..6a6d177f4 100644 --- a/statistics.c +++ b/statistics.c @@ -228,7 +228,7 @@ char *get_time_string(int seconds, int maxdays) static void get_ranges(char *buffer, int size) { int i, len; - int first, last = -1; + int first = -1, last = -1; snprintf(buffer, size, "%s", translate("gettextFromC","for dives #")); for (i = 0; i < dive_table.nr; i++) {