summaryrefslogtreecommitdiffstats
path: root/smtk-import/smartrak.c
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2017-04-12 21:59:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-21 06:52:13 -0700
commit441cfb3f056d3a57ca27b67f223129f348fb78fe (patch)
tree2bd06350433b650924a4d6576ba83c8f984d1911 /smtk-import/smartrak.c
parent75007aa4ef7b99064678ff92ec9819e76f553cfb (diff)
downloadsubsurface-441cfb3f056d3a57ca27b67f223129f348fb78fe.tar.gz
smtk-import: Add curly braces in nested conditionals
Curly braces are necessary in nested conditionals or results may not be those expected. In this case, the "else" clause applied on second "if", instead of first one. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Diffstat (limited to 'smtk-import/smartrak.c')
-rw-r--r--smtk-import/smartrak.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c
index a50186b3d..b1ac3ef58 100644
--- a/smtk-import/smartrak.c
+++ b/smtk-import/smartrak.c
@@ -904,11 +904,12 @@ void smartrak_import(const char *file, struct dive_table *divetable)
smtkdive->cylinder[i].end.mbar = lrint(strtod(col[(i * 2) + 1 + pstartcol]->bind_ptr, NULL) * 1000 ? : 1000);
if (smtkdive->cylinder[i].gasmix.o2.permille == 0)
smtkdive->cylinder[i].gasmix.o2.permille = lrint(strtod(col[i + o2fraccol]->bind_ptr, NULL) * 10);
- if (smtk_version == 10213)
+ if (smtk_version == 10213) {
if (smtkdive->cylinder[i].gasmix.he.permille == 0)
smtkdive->cylinder[i].gasmix.he.permille = lrint(strtod(col[i + hefraccol]->bind_ptr, NULL) * 10);
- else
+ } else {
smtkdive->cylinder[i].gasmix.he.permille = 0;
+ }
smtk_build_tank_info(mdb_clon, &smtkdive->cylinder[i], col[i + tankidxcol]->bind_ptr);
}
/* Check for duplicated cylinders and clean them */