Thread: [Iup-users] CID 210632 (#1 of 1): Logically dead code (DEADCODE)
Brought to you by:
scuri
From: Ranier VF <ran...@ho...> - 2018-01-19 17:21:49
Attachments:
iup_ledlex.patch
|
Hi, Issue found by Coverity Scan. CID 210632 (#1 of 1): Logically dead code (DEADCODE) array_null: Comparing an array to null is not useful: ilex.name, since the test will always evaluate as true. --- a\src\iup_ledlex.c Sun Jul 26 03:10:06 2015 +++ b\src\iup_ledlex.c Fri Jan 19 15:20:27 2018 @@ -150,10 +150,7 @@ char* iupLexGetName(void) { - if (ilex.name) - return iupStrDup(ilex.name); - else - return NULL; + return iupStrDup(ilex.name); } char* iupLexName(void) Best. Ranier |
From: Antonio S. <ant...@gm...> - 2018-01-20 15:55:54
|
Fixed and committed to SVN. Best, Scuri 2018-01-19 15:21 GMT-02:00 Ranier VF <ran...@ho...>: > Hi, > Issue found by Coverity Scan. > CID 210632 (#1 of 1): Logically dead code (DEADCODE) > array_null: Comparing an array to null is not useful: ilex.name, since > the test will always evaluate as true. > > --- a\src\iup_ledlex.c Sun Jul 26 03:10:06 2015 > +++ b\src\iup_ledlex.c Fri Jan 19 15:20:27 2018 > @@ -150,10 +150,7 @@ > > char* iupLexGetName(void) > { > - if (ilex.name) > - return iupStrDup(ilex.name); > - else > - return NULL; > + return iupStrDup(ilex.name); > } > > char* iupLexName(void) > > Best. > Ranier > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Iup-users mailing list > Iup...@li... > https://lists.sourceforge.net/lists/listinfo/iup-users > > |
From: Antonio S. <ant...@gm...> - 2018-01-20 15:55:57
|
Fixed and committed to SVN. Best, Scuri 2018-01-19 15:21 GMT-02:00 Ranier VF <ran...@ho...>: > Hi, > Issue found by Coverity Scan. > CID 210632 (#1 of 1): Logically dead code (DEADCODE) > array_null: Comparing an array to null is not useful: ilex.name, since > the test will always evaluate as true. > > --- a\src\iup_ledlex.c Sun Jul 26 03:10:06 2015 > +++ b\src\iup_ledlex.c Fri Jan 19 15:20:27 2018 > @@ -150,10 +150,7 @@ > > char* iupLexGetName(void) > { > - if (ilex.name) > - return iupStrDup(ilex.name); > - else > - return NULL; > + return iupStrDup(ilex.name); > } > > char* iupLexName(void) > > Best. > Ranier > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Iup-users mailing list > Iup...@li... > https://lists.sourceforge.net/lists/listinfo/iup-users > > |