From f7134a952160aca70d7316549195b815de542100 Mon Sep 17 00:00:00 2001 From: akisiel Date: Mon, 5 Dec 2011 09:01:14 +0000 Subject: [PATCH] Fix Coverity --- TTherminator/Therminator/Parser.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TTherminator/Therminator/Parser.cxx b/TTherminator/Therminator/Parser.cxx index 892935ef488..6c4d5d3b35b 100644 --- a/TTherminator/Therminator/Parser.cxx +++ b/TTherminator/Therminator/Parser.cxx @@ -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]; -- 2.39.3