aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-07 10:08:27 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-07 10:08:27 +0530
commit8ab1e3c5da78c05b8edf48d44e6fde046d50e582 (patch)
tree4e96c8f691029efbaf1f0f7bc074f2abee727b72 /include
parentf6071344e355e46072475b5578da6673294427c1 (diff)
util: refactor error reporting
Diffstat (limited to 'include')
-rw-r--r--include/util.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/util.h b/include/util.h
index b6c64e0..e19dbe8 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,8 +1,6 @@
#include <stdio.h>
-#define err_die(r, ...) {\
- fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \
- fprintf(stderr, __VA_ARGS__); \
- fputc('\n', stderr); \
+#define err_ret(r, fmt, ...) {\
+ fprintf(stderr, "[%s:%d] " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
return r; \
}