summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_def.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-04 16:14:00 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-13 09:35:31 +0100
commita150f8e1fcc38752fef4d7c75d765d8efc7d46d6 (patch)
treef7f62c9a5d8407d8b17820fbef67378aa7b9ddbb /crypto/conf/conf_def.c
parent9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (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/conf/conf_def.c')
-rw-r--r--crypto/conf/conf_def.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 5923f88212..2637e17fd8 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -462,8 +462,8 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
}
continue;
} else if (*p != '=') {
- ERR_raise(ERR_LIB_CONF, CONF_R_MISSING_EQUAL_SIGN);
- ERR_add_error_data(2, "HERE-->", p);
+ ERR_raise_data(ERR_LIB_CONF, CONF_R_MISSING_EQUAL_SIGN,
+ "HERE-->%s", p);
goto err;
}
*end = '\0';
@@ -760,9 +760,8 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
if (S_ISDIR(st.st_mode)) {
if (*dirctx != NULL) {
- ERR_raise(ERR_LIB_CONF,
- CONF_R_RECURSIVE_DIRECTORY_INCLUDE);
- ERR_add_error_data(1, include);
+ ERR_raise_data(ERR_LIB_CONF, CONF_R_RECURSIVE_DIRECTORY_INCLUDE,
+ "%s", include);
return NULL;
}
/* a directory, load its contents */