diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-07-21 20:52:35 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-07-21 20:52:35 +0200 |
commit | 7021e35029dbbd3b7588c5a334daba582805535a (patch) | |
tree | e4e7c8abbbe3a2d1eeb5fed53b477cda0cc98e0a | |
parent | d2184ecf334e0ecabc4eeb36fc85750f9e2c7ff5 (diff) |
stijl
-rw-r--r-- | src/io/read_file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/io/read_file.c b/src/io/read_file.c index e81a6f7..c344f5b 100644 --- a/src/io/read_file.c +++ b/src/io/read_file.c @@ -73,13 +73,12 @@ struct filebuf *file_to_filebuf(char *fname) { return res; } -stream: { +stream: FILE *stream = fdopen(fd, "rb"); struct filebuf *res = stream_to_filebuf(stream); fclose(stream); return res; } -} void free_filebuf(struct filebuf *fb) { switch (fb->mapping_type) { |