summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-11 21:21:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-11 22:17:50 +0100
commit160fb321bcf0c41770464d5272ea24f1e01d50dc (patch)
treee110d5f31c111458333579aa9326aa8a5569702c /statistics.c
parent2c689964ab5578d7df1b77e4d19a8e02218163e4 (diff)
downloadsubsurface-160fb321bcf0c41770464d5272ea24f1e01d50dc.tar.gz
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 <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'statistics.c')
-rw-r--r--statistics.c2
1 files changed, 1 insertions, 1 deletions
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++) {