X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fex_data.c;h=3b11e7a55613ce80be92183f298bb1907fed295e;hb=d34353cc9102858f0f9e4434998977ce68c35919;hp=a135858c696e9d8c83fdf658d5f83015cc9a03b3;hpb=435037d4e48d6edc2cd9b42ac71c8831c89eba52;p=oweals%2Fopenssl.git diff --git a/crypto/ex_data.c b/crypto/ex_data.c index a135858c69..3b11e7a556 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -138,12 +138,8 @@ * */ -#include -#include -#include -#include -#include #include "cryptlib.h" +#include /* What an "implementation of ex_data functionality" looks like */ struct st_CRYPTO_EX_DATA_IMPL @@ -279,16 +275,15 @@ static int ex_data_check(void) #define EX_DATA_CHECK(iffail) if(!ex_data && !ex_data_check()) {iffail} /* This "inner" callback is used by the callback function that follows it */ -static void def_cleanup_util_cb(void *v) +static void def_cleanup_util_cb(CRYPTO_EX_DATA_FUNCS *funcs) { - CRYPTO_EX_DATA_FUNCS *funcs = (CRYPTO_EX_DATA_FUNCS *)v; OPENSSL_free(funcs); } /* This callback is used in lh_doall to destroy all EX_CLASS_ITEM values from * "ex_data" prior to the ex_data hash table being itself destroyed. Doesn't do * any locking. */ -static void def_cleanup_cb(const void *a_void) +static void def_cleanup_cb(void *a_void) { EX_CLASS_ITEM *item = (EX_CLASS_ITEM *)a_void; sk_CRYPTO_EX_DATA_FUNCS_pop_free(item->meth, def_cleanup_util_cb); @@ -359,7 +354,7 @@ static int def_add_index(EX_CLASS_ITEM *item, long argl, void *argp, } } toret = item->meth_num++; - sk_CRYPTO_EX_DATA_FUNCS_set(item->meth, toret, a); + (void)sk_CRYPTO_EX_DATA_FUNCS_set(item->meth, toret, a); err: CRYPTO_w_unlock(CRYPTO_LOCK_EX_DATA); return toret;