summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-07-22 13:20:20 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-07-22 13:20:22 +0200
commit271fd3f2d0d53478b1b6cdfb66ae28b219c571ba (patch)
tree691dc92243b967b4a377bf2637397f95f1ee6ac1
parentec3808dbf2bc75f8b187f16e3fe64510f0b9930c (diff)
add comment explaining {} in file_to_filebuf
-rw-r--r--src/io/read_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/io/read_file.c b/src/io/read_file.c
index b7b1095..e9e4a6a 100644
--- a/src/io/read_file.c
+++ b/src/io/read_file.c
@@ -84,6 +84,8 @@ struct filebuf *file_to_filebuf(char *fname, int openOptions) {
return res;
}
+ // braces are needed until we actually use c23 instead of c2x (only c23 allows
+ // labels before delcarations)
sponge: {
FILE *stream = fdopen(fd, "rb");
struct filebuf *res = stream_to_filebuf(stream, openOptions);