mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22: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:
@@ -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