From 10e400303f80824497832d40a9182c71b85b992c Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Sun, 3 Jul 2022 00:44:46 -0500 Subject: [PATCH] Rename errno to errno_code --- include/gargoyle/delusion.h | 2 +- src/delusion.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/gargoyle/delusion.h b/include/gargoyle/delusion.h index a64acb8..d7b9845 100644 --- a/include/gargoyle/delusion.h +++ b/include/gargoyle/delusion.h @@ -8,7 +8,7 @@ struct gargoyle_err { gargoyle_err_type code; - int errno; + int errno_code; char func[GARGOYLE_MAX_FUNC_SZ]; char errno_func[GARGOYLE_MAX_FUNC_SZ]; char msg[GARGOYLE_MAX_ERR_SZ]; diff --git a/src/delusion.c b/src/delusion.c index 7c48eef..86886aa 100644 --- a/src/delusion.c +++ b/src/delusion.c @@ -6,8 +6,8 @@ void gargoyle_emit_err(struct gargoyle_err *err) { fprintf(stderr, "%s(%u): ", err->func, err->code); - if(err->errno) { - fprintf(stderr, "%s(%d): ", err->errno_func, err->errno); + if(err->errno_code) { + fprintf(stderr, "%s(%d): ", err->errno_func, err->errno_code); } fprintf(stderr, "%s\n", err->msg); @@ -15,7 +15,7 @@ void gargoyle_emit_err(struct gargoyle_err *err) { void gargoyle_fill_err(struct gargoyle_err *err, gargoyle_err_type code, int errno_code, const char *func, const char *errno_func, const char *fmt, ...) { err->code = code; - err->errno = errno_code; + err->errno_code = errno_code; if(func) {