BUGS: more Coverity scan fixes.

This commit is contained in:
iceman1001 2015-05-13 14:08:59 +02:00
commit 664bb5ae72
6 changed files with 10 additions and 13 deletions

View file

@ -356,10 +356,7 @@ int loadTraceCard(uint8_t *tuid) {
FillFileNameByUID(traceFileName, tuid, ".eml", 7);
f = fopen(traceFileName, "r");
if (!f) {
fclose(f);
return 1;
}
if (!f) return 1;
blockNum = 0;
@ -396,10 +393,7 @@ int saveTraceCard(void) {
if ((!strlen(traceFileName)) || (isTraceCardEmpty())) return 0;
f = fopen(traceFileName, "w+");
if ( !f ) {
fclose(f);
return 1;
}
if ( !f ) return 1;
for (int i = 0; i < 64; i++) { // blocks
for (int j = 0; j < 16; j++) // bytes