fix stuff found by cppcheck
almost 3000 lines of "errors" contained one actual memleak, one actually unused variable and three actual ambiguous code parts from cppcheck website: "The goal is to detect only real errors in the code (i.e. have zero false positives)." :) thx for finding five problems in our code
This commit is contained in:
@@ -305,7 +305,7 @@ void processdownload(package *pck, stream *f) // write downloaded data to file(s
|
||||
else
|
||||
{ // any name with listed extension, written to subdirectory
|
||||
int zlen = (int)strlen(zname), elen = (int)strlen(pck->exts[n]);
|
||||
if((isok = zlen > elen && !strcmp(zname + zlen - elen, pck->exts[n]))) formatstring(filename)("%s/%s", pck->fullpath, zname);
|
||||
if((isok = (zlen > elen && !strcmp(zname + zlen - elen, pck->exts[n])))) formatstring(filename)("%s/%s", pck->fullpath, zname);
|
||||
}
|
||||
if(isok) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user