From 2c31d942af28a20e87979cbc76c3dd8d162c1a9c Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Tue, 12 Apr 2022 12:30:08 +0200 Subject: str[n]casecmp => OPENSSL_strncasecmp Reviewed-by: Tim Hudson Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18103) --- crypto/objects/o_names.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'crypto/objects') diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index 92152eeb66..7596d720e9 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -21,23 +21,6 @@ #include "obj_local.h" #include "e_os.h" -/* - * We define this wrapper for two reasons. Firstly, later versions of - * DEC C add linkage information to certain functions, which makes it - * tricky to use them as values to regular function pointers. - * Secondly, in the EDK2 build environment, the strcasecmp function is - * actually an external function with the Microsoft ABI, so we can't - * transparently assign function pointers to it. - */ -#if defined(OPENSSL_SYS_VMS_DECC) || defined(OPENSSL_SYS_UEFI) -static int obj_strcasecmp(const char *a, const char *b) -{ - return strcasecmp(a, b); -} -#else -#define obj_strcasecmp strcasecmp -#endif - /* * I use the ex_data stuff to manage the identifiers for the obj_name_types * that applications may define. I only really use the free function field. @@ -111,7 +94,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *), goto out; } name_funcs->hash_func = ossl_lh_strcasehash; - name_funcs->cmp_func = obj_strcasecmp; + name_funcs->cmp_func = OPENSSL_strcasecmp; push = sk_NAME_FUNCS_push(name_funcs_stack, name_funcs); if (!push) { @@ -145,7 +128,7 @@ static int obj_name_cmp(const OBJ_NAME *a, const OBJ_NAME *b) ret = sk_NAME_FUNCS_value(name_funcs_stack, a->type)->cmp_func(a->name, b->name); } else - ret = strcasecmp(a->name, b->name); + ret = OPENSSL_strcasecmp(a->name, b->name); } return ret; } -- cgit v1.2.3