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) {