]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/mysql/mysql_store.cpp
Various fixes of issues reported by static analyzers.
[stg.git] / projects / stargazer / plugins / store / mysql / mysql_store.cpp
index 198b5f3b812375fcfe88ef3fa532865f45eb1cac..8108de0900a12b4d29278965fc0397968ffcfc2a 100644 (file)
@@ -222,12 +222,13 @@ else
             {
                  if(mysql_select_db(sock, storeSettings.GetDBName().c_str()))
                  {
-                    errorStr = "Couldn't select database! With error:\n";
-                    errorStr += mysql_error(sock);
-                    mysql_close(sock);
-                    ret = -1;
+                     errorStr = "Couldn't select database! With error:\n";
+                     errorStr += mysql_error(sock);
+                     mysql_close(sock);
+                     ret = -1;
                  }
-                 ret = CheckAllTables(sock);
+                 else
+                     ret = CheckAllTables(sock);
             }
         }
         else