]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 09:01:14 +0000 (09:01 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 09:01:14 +0000 (09:01 +0000)
TTherminator/Therminator/Parser.cxx

index 892935ef488c643d2c291ae174c9dd96f7de2dab..6c4d5d3b35bceaec43fead43ceda019043f4cbc4 100644 (file)
@@ -299,7 +299,7 @@ void Parser::ReadInput()
       if(str[0] == 's' && str[1] == 'e' && str[2] == '[')
        {
          // Reading in the decay channels
-         char *tLBrackert, *tFirstComma, *tSecondComma, *tThirdComma, *tRBracket;
+         char *tLBrackert=NULL, *tFirstComma=NULL, *tSecondComma=NULL, *tThirdComma=NULL, *tRBracket=NULL;
          
          tLBrackert = strchr(str,'[');
          tFirstComma = strchr(str,',');
@@ -307,7 +307,7 @@ void Parser::ReadInput()
          tThirdComma = strchr(tSecondComma+1,',');
          tRBracket = strchr(tThirdComma,']');
 
-         if (!(tLBrackert && tFirstComma && tSecondComma && tThirdComma && tRBracket))
+         if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL)))
            PRINT_DEBUG_1("Malformed line!: " << str);
          
          char *tFather = new char[tFirstComma-tLBrackert];