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,6 +920,7 @@ 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); int const ret = fseek(srcFile, ((long)headerSize)-((long)numBytesRead), SEEK_CUR);
if (ret != 0) { if (ret != 0) {
DISPLAY("Error: could not move to end of frame header\n"); DISPLAY("Error: could not move to end of frame header\n");
@ -927,6 +928,7 @@ static int getFileInfo(fileInfo_t* info, const char* inFileName){
break; break;
} }
} }
}
/* skip the rest of the blocks in the frame */ /* skip the rest of the blocks in the frame */
{ {
@ -1038,11 +1040,13 @@ 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); int const error = getFileInfo(&info, inFileName);
if (error == 1) { if (error == 1) {
DISPLAY("An error occurred with getting file info\n"); DISPLAY("An error occurred with getting file info\n");
return 1; return 1;
} }
}
displayInfo(inFileName, &info, displayLevel); displayInfo(inFileName, &info, displayLevel);
return 0; return 0;
} }