diff options
author | Richard Levitte <levitte@openssl.org> | 2019-07-24 13:25:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-07-31 06:44:45 +0200 |
commit | add8c8e9647a71cc755dea22490e2075e342624b (patch) | |
tree | 5189711696c4c1b4bc9d6357fbfa00854012ae76 /crypto | |
parent | ed57f7f93508776b898e4c23b65d67f3479edaf1 (diff) |
ERR: Remove ERR_put_func_error() and reimplement ERR_put_error() as a macro
Also, deprecate ERR_put_error()
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9452)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/err/err.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 60f945c845..f129c1c7d6 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -355,44 +355,6 @@ void err_free_strings_int(void) /********************************************************/ -void ERR_put_func_error(int lib, const char *func, int reason, - const char *file, int line) -{ - ERR_put_error(lib, 0, reason, file, line); - ERR_add_error_data(2, "calling function ", func); -} - -void ERR_put_error(int lib, int func, int reason, const char *file, int line) -{ - ERR_STATE *es; - -#ifdef _OSD_POSIX - /* - * In the BS2000-OSD POSIX subsystem, the compiler generates path names - * in the form "*POSIX(/etc/passwd)". This dirty hack strips them to - * something sensible. @@@ We shouldn't modify a const string, though. - */ - if (strncmp(file, "*POSIX(", sizeof("*POSIX(") - 1) == 0) { - char *end; - - /* Skip the "*POSIX(" prefix */ - file += sizeof("*POSIX(") - 1; - end = &file[strlen(file) - 1]; - if (*end == ')') - *end = '\0'; - /* Optional: use the basename of the path only. */ - if ((end = strrchr(file, '/')) != NULL) - file = &end[1]; - } -#endif - es = ERR_get_state(); - if (es == NULL) - return; - - err_get_slot(es); - err_clear(es, es->top, 0); -} - void ERR_clear_error(void) { int i; |