Changeset 441cfb3 in subsurface


Ignore:
Timestamp:
Apr 21, 2017, 6:52:13 AM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
02e768a
Parents:
75007aa
git-author:
Salvador Cuñat <salvador.cunat@…> (04/12/17 12:59:56)
git-committer:
Dirk Hohndel <dirk@…> (04/21/17 06:52:13)
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smtk-import/smartrak.c

    r75007aa r441cfb3  
    905905                        if (smtkdive->cylinder[i].gasmix.o2.permille == 0)
    906906                                smtkdive->cylinder[i].gasmix.o2.permille = lrint(strtod(col[i + o2fraccol]->bind_ptr, NULL) * 10);
    907                         if (smtk_version == 10213)
     907                        if (smtk_version == 10213) {
    908908                                if (smtkdive->cylinder[i].gasmix.he.permille == 0)
    909909                                        smtkdive->cylinder[i].gasmix.he.permille = lrint(strtod(col[i + hefraccol]->bind_ptr, NULL) * 10);
    910                         else
     910                        } else {
    911911                                smtkdive->cylinder[i].gasmix.he.permille = 0;
     912                        }
    912913                        smtk_build_tank_info(mdb_clon, &smtkdive->cylinder[i], col[i + tankidxcol]->bind_ptr);
    913914                }
Note: See TracChangeset for help on using the changeset viewer.