From 8ab1e3c5da78c05b8edf48d44e6fde046d50e582 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 7 Apr 2024 10:08:27 +0530 Subject: util: refactor error reporting --- include/util.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') 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 -#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; \ } -- cgit v1.2.3