mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
A few stylistic tweaks
- `goto free_romx` -> the more typical `goto cleanup` - `goto fail` -> the more typical `goto finish` - Remove a redundant `todo` variable
This commit is contained in:
@@ -2257,8 +2257,8 @@ static int skipIfBlock(bool toEndc)
|
||||
}
|
||||
} while (!atLineStart);
|
||||
}
|
||||
finish:
|
||||
|
||||
finish:
|
||||
lexerState->disableMacroArgs = false;
|
||||
lexerState->disableInterpolation = false;
|
||||
lexerState->atLineStart = false;
|
||||
@@ -2344,8 +2344,8 @@ static int yylex_SKIP_TO_ENDR(void)
|
||||
}
|
||||
} while (!atLineStart);
|
||||
}
|
||||
finish:
|
||||
|
||||
finish:
|
||||
lexerState->disableMacroArgs = false;
|
||||
lexerState->disableInterpolation = false;
|
||||
lexerState->atLineStart = false;
|
||||
|
||||
@@ -951,9 +951,7 @@ void sect_BinaryFileSlice(char const *s, int32_t start_pos, int32_t length)
|
||||
(void)fgetc(f);
|
||||
}
|
||||
|
||||
int32_t todo = length;
|
||||
|
||||
while (todo--) {
|
||||
while (length--) {
|
||||
int byte = fgetc(f);
|
||||
|
||||
if (byte != EOF) {
|
||||
@@ -962,7 +960,7 @@ void sect_BinaryFileSlice(char const *s, int32_t start_pos, int32_t length)
|
||||
error("Error reading INCBIN file '%s': %s\n", s, strerror(errno));
|
||||
} else {
|
||||
error("Premature end of file (%" PRId32 " bytes left to read)\n",
|
||||
todo + 1);
|
||||
length + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user