aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils.c b/src/utils.c
index da3833c..da340db 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -177,14 +177,13 @@ char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn
if (fp == NULL) {
perror(filename);
- fprintf(SYSERROR);
+ SYSERROR("failed to open %s for reading", filename);
return NULL;
}
// Allocate buffer
if ((buffer = calloc(OMC_BUFSIZ, sizeof(char))) == NULL) {
- perror("line buffer");
- fprintf(SYSERROR);
+ SYSERROR("unable to allocate %d bytes for buffer", OMC_BUFSIZ);
if (!use_stdin) {
fclose(fp);
}
@@ -579,7 +578,6 @@ int xml_pretty_print_in_place(const char *filename, const char *pretty_print_pro
return 0;
pretty_print_failed:
- fprintf(SYSERROR);
if (fp) {
fclose(fp);
}