diff --git a/legacy/evil/src/lib/evil_private.h b/legacy/evil/src/lib/evil_private.h index d1c9823a93..2933931e46 100644 --- a/legacy/evil/src/lib/evil_private.h +++ b/legacy/evil/src/lib/evil_private.h @@ -2,7 +2,7 @@ #define __EVIL_PRIVATE_H__ -void _evil_error_display(LONG res); +void _evil_error_display(const char *fct, LONG res); #endif /* __EVIL_PRIVATE_H__ */ diff --git a/legacy/evil/src/lib/evil_stdlib.c b/legacy/evil/src/lib/evil_stdlib.c index 0dc3410b9a..0f4bdccf06 100644 --- a/legacy/evil/src/lib/evil_stdlib.c +++ b/legacy/evil/src/lib/evil_stdlib.c @@ -49,7 +49,7 @@ getenv(const char *name) 0, 0, &key)) != ERROR_SUCCESS) { - _evil_error_display(res); + _evil_error_display(__FILE__, res); return NULL; } @@ -57,7 +57,7 @@ getenv(const char *name) if (!wname) { if ((res = RegCloseKey (key)) != ERROR_SUCCESS) - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return NULL; } @@ -67,7 +67,7 @@ getenv(const char *name) &size)) != ERROR_SUCCESS) { if ((res = RegCloseKey (key)) != ERROR_SUCCESS) - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); free(wname); return NULL; } @@ -76,7 +76,7 @@ getenv(const char *name) if ((res = RegCloseKey (key)) != ERROR_SUCCESS) { - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return NULL; } @@ -193,7 +193,7 @@ setenv(const char *name, &key, &disposition)) != ERROR_SUCCESS) { - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return -1; } @@ -205,7 +205,7 @@ setenv(const char *name, if (!wname) { if ((res = RegCloseKey (key)) != ERROR_SUCCESS) - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return -1; } @@ -216,9 +216,9 @@ setenv(const char *name, strlen(value) + 1)) != ERROR_SUCCESS) { free(wname); - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); if ((res = RegCloseKey (key)) != ERROR_SUCCESS) - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return -1; } @@ -226,7 +226,7 @@ setenv(const char *name, if ((res = RegCloseKey (key)) != ERROR_SUCCESS) { - _evil_error_display(res); + _evil_error_display(__FUNCTION__, res); return -1; } diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.c index 1d42713a2f..ae45910fd7 100644 --- a/legacy/evil/src/lib/evil_unistd.c +++ b/legacy/evil/src/lib/evil_unistd.c @@ -261,7 +261,7 @@ evil_getcwd(char *buffer, size_t size) if (!ret) { - _evil_error_display(ret); + _evil_error_display(__FUNCTION__, ret); return NULL; } diff --git a/legacy/evil/src/lib/evil_util.c b/legacy/evil/src/lib/evil_util.c index 6a2f4e2c76..b5a97c7e48 100644 --- a/legacy/evil/src/lib/evil_util.c +++ b/legacy/evil/src/lib/evil_util.c @@ -93,12 +93,12 @@ evil_format_message(long err) } void -_evil_error_display(LONG res) +_evil_error_display(const char *fct, LONG res) { char *error; error = evil_format_message(res); - fprintf(stderr, "[Evil] [%s] ERROR: %s\n", __FUNCTION__, error); + fprintf(stderr, "[Evil] [%s] ERROR: %s\n", fct, error); free(error); }