refactoring brackets to allow for const values

This commit is contained in:
Paul Cruz 2017-06-15 16:27:38 -07:00
parent 0757eae6ff
commit acaefb531b

View File

@ -920,11 +920,13 @@ static int getFileInfo(fileInfo_t* info, const char* inFileName){
detectError = 1; detectError = 1;
break; break;
} }
int const ret = fseek(srcFile, ((long)headerSize)-((long)numBytesRead), SEEK_CUR); {
if (ret != 0) { int const ret = fseek(srcFile, ((long)headerSize)-((long)numBytesRead), SEEK_CUR);
DISPLAY("Error: could not move to end of frame header\n"); if (ret != 0) {
detectError = 1; DISPLAY("Error: could not move to end of frame header\n");
break; detectError = 1;
break;
}
} }
} }
@ -1038,10 +1040,12 @@ static void displayInfo(const char* inFileName, fileInfo_t* info, int displayLev
int FIO_listFile(const char* inFileName, int displayLevel){ int FIO_listFile(const char* inFileName, int displayLevel){
fileInfo_t info; fileInfo_t info;
DISPLAYOUT("File: %s\n", inFileName); DISPLAYOUT("File: %s\n", inFileName);
int const error = getFileInfo(&info, inFileName); {
if (error == 1) { int const error = getFileInfo(&info, inFileName);
DISPLAY("An error occurred with getting file info\n"); if (error == 1) {
return 1; DISPLAY("An error occurred with getting file info\n");
return 1;
}
} }
displayInfo(inFileName, &info, displayLevel); displayInfo(inFileName, &info, displayLevel);
return 0; return 0;