summaryrefslogtreecommitdiff
path: root/src/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/io')
-rw-r--r--src/io/read_file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/io/read_file.c b/src/io/read_file.c
index 99bea2a..219a395 100644
--- a/src/io/read_file.c
+++ b/src/io/read_file.c
@@ -4,14 +4,13 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "util/error.h"
#include "read_file.h"
#include "global.h"
#define CHECK_OOM(ptr) \
if (ptr == NULL) { \
- fprintf(stderr, "%s: geheugen is op\n", progname); \
- /* I think I should free the original memory here, but whatever */ \
- return NULL; \
+ print_error_nomem(); \
}
struct filebuf *stream_to_filebuf(FILE *restrict stream, int openOptions) {