aboutsummaryrefslogtreecommitdiff
path: root/files.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-17 18:06:00 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-17 18:06:00 -0800
commitc6dd967c7062625ba0d473f8f6088142c16ed6b0 (patch)
tree112de705619ffeea42f045f3377d15c52a066fab /files.h
parente248f5b2a8254d20ded7685e426e53ac90940cba (diff)
Fixed two bugs: mmapped files weren't getting closed, and filenames with
%s-style formatting strings caused issues.
Diffstat (limited to 'files.h')
-rw-r--r--files.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/files.h b/files.h
index cee341c..c7176b8 100644
--- a/files.h
+++ b/files.h
@@ -17,8 +17,10 @@ typedef struct file_s {
unsigned int mmapped:1;
} file_t;
+__attribute__((nonnull(2)))
+file_t *load_file(file_t **files, const char *filename);
__attribute__((format(printf,2,3)))
-file_t *load_file(file_t **files, const char *fmt, ...);
+file_t *load_filef(file_t **files, const char *fmt, ...);
__attribute__((nonnull(3), returns_nonnull))
file_t *spoof_file(file_t **files, const char *filename, const char *text);
__attribute__((nonnull))