]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
ported MFT-4.5.0 pt2
authorAdrian Chiris <adrianc@mellanox.com>
Mon, 12 Sep 2016 12:21:20 +0000 (15:21 +0300)
committerAdrian Chiris <adrianc@mellanox.com>
Mon, 12 Sep 2016 12:21:20 +0000 (15:21 +0300)
mlxconfig/mlxcfg_ui.cpp

index f7d3a329b25e099d69f7ecf5bfa51b862e1b67e5..ef2906e8acda48a2c41750e25b2f9faa0fab3682 100644 (file)
@@ -856,7 +856,7 @@ mlxCfgStatus MlxCfg::writeNVOutputFile(string content)
         return err(true, "Failed to open file: %s",
                 _mlxParams.NVOutputFile.c_str());
     }
-    fprintf(file, content.c_str());
+    fprintf(file, "%s", content.c_str());
     fclose(file);
     return MLX_CFG_OK;
 }
@@ -916,7 +916,7 @@ mlxCfgStatus MlxCfg::genXMLTemplate()
                 tlvName += tLine[i];
             } else {
                 while ((tLine[i] == ' ' || tLine[i] == '\t')
-                        && (++i < tLine.size()));
+                        && (++i < tLine.size())) { };
                 if ((i == tLine.size()) ||
                         (tLine[i] != '0' && tLine[i] != '1') ||
                         (i != tLine.size() - 1) ||