summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-10 22:11:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 13:37:27 -0700
commit86d66d3c9dfdbcd2745cd6a9c540bd50899722d6 (patch)
treef7575979d44d5428c89a822005bd9780c9f1fb89 /planner.c
parent94e66dbdd6cf5120b7e139909bc2da93a7ef2934 (diff)
downloadsubsurface-86d66d3c9dfdbcd2745cd6a9c540bd50899722d6.tar.gz
Limit the scope of gasidx in add_plan_to_notes
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/planner.c b/planner.c
index 785db4db5..5cd9ba929 100644
--- a/planner.c
+++ b/planner.c
@@ -518,7 +518,7 @@ static unsigned int *sort_stops(int *dstops, int dnr, struct gaschanges *gstops,
static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_disclaimer)
{
char buffer[20000], temp[1000];
- int len, gasidx, lastdepth = 0, lasttime = 0;
+ int len, lastdepth = 0, lasttime = 0;
struct divedatapoint *dp = diveplan->dp;
bool gaschange = !plan_verbatim;
struct divedatapoint *nextdp = NULL;
@@ -637,7 +637,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
snprintf(temp, sizeof(temp), "%s", translate("gettextFromC", "Gas consumption:"));
len += snprintf(buffer + len, sizeof(buffer) - len, "</tbody></table></div><div><br>%s<br>", temp);
- for (gasidx = 0; gasidx < MAX_CYLINDERS; gasidx++) {
+ for (int gasidx = 0; gasidx < MAX_CYLINDERS; gasidx++) {
double volume, pressure, deco_volume, deco_pressure;
const char *unit, *pressure_unit;
char warning[1000] = "";