Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/flatcc/support/readfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static char *readfile(const char *filename, size_t max_size, size_t *size_out)
if (max_size > 0 && size > max_size) {
goto fail;
}
rewind(fp);
if (fseek(fp, 0L, SEEK_SET)) goto fail;
buf = (char *)malloc(size ? size : 1);
if (!buf) {
goto fail;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ char *fb_read_file(const char *filename, size_t max_size, size_t *size_out)
if (max_size > 0 && size > max_size) {
goto fail;
}
rewind(fp);
if (fseek(fp, 0L, SEEK_SET)) goto fail;
buf = malloc(size ? size : 1);
if (!buf) {
goto fail;
Expand Down