diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 16:14:00 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-13 09:35:31 +0100 |
commit | a150f8e1fcc38752fef4d7c75d765d8efc7d46d6 (patch) | |
tree | f7f62c9a5d8407d8b17820fbef67378aa7b9ddbb /crypto/dso/dso_win32.c | |
parent | 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (diff) |
CRYPTO: refactor ERR_raise()+ERR_add_error_data() to ERR_raise_data()
This is not done absolutely everywhere, as there are places where
the use of ERR_add_error_data() is quite complex, but at least the
simple cases are done.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/dso/dso_win32.c')
-rw-r--r-- | crypto/dso/dso_win32.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 3b4d596220..4d3059d438 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -105,8 +105,8 @@ static int win32_load(DSO *dso) } h = LoadLibraryA(filename); if (h == NULL) { - ERR_raise(ERR_LIB_DSO, DSO_R_LOAD_FAILED); - ERR_add_error_data(3, "filename(", filename, ")"); + ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED, + "filename(%s)", filename); goto err; } p = OPENSSL_malloc(sizeof(*p)); @@ -181,8 +181,7 @@ static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname) } sym.f = GetProcAddress(*ptr, symname); if (sym.p == NULL) { - ERR_raise(ERR_LIB_DSO, DSO_R_SYM_FAILURE); - ERR_add_error_data(3, "symname(", symname, ")"); + ERR_raise_data(ERR_LIB_DSO, DSO_R_SYM_FAILURE, "symname(%s)", symname); return NULL; } return (DSO_FUNC_TYPE)sym.f; |