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:
Rangi
2021-11-17 23:51:40 -05:00
parent e5552e27f2
commit efccf6c931
3 changed files with 14 additions and 17 deletions

View File

@@ -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);
}
}