aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-03-22 22:12:55 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-03-22 22:20:31 -0400
commit5054264d93bff2ad54d909d796e93f3081ee9703 (patch)
tree626cb03921882c90372e93a4684b56bb79d0bab0 /src/utils.c
parent22e4934dc0184a2e50eb80d5890c1a16613ff821 (diff)
downloadstasis-5054264d93bff2ad54d909d796e93f3081ee9703.tar.gz
Error messages
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);
}