Rename errno to errno_code
This commit is contained in:
parent
8c8fc79c03
commit
10e400303f
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue