Create function of the form OBJ_bsearch_xxx() in bsearch typesafe macros

with the appropriate parameters which calls OBJ_bsearch(). A compiler will
typically inline this.

This avoids the need for cmp_xxx variables and fixes unchecked const issues
with CHECKED_PTR_OF()
This commit is contained in:
Dr. Stephen Henson
2008-10-22 15:43:01 +00:00
parent ae7ec4c71d
commit e19106f5fb
13 changed files with 70 additions and 86 deletions

View File

@@ -2794,8 +2794,7 @@ const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p)
id=0x03000000L|((unsigned long)p[0]<<8L)|(unsigned long)p[1];
c.id=id;
cp = OBJ_bsearch(SSL_CIPHER, &c, SSL_CIPHER, ssl3_ciphers,
SSL3_NUM_CIPHERS, ssl_cipher_id_cmp);
cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
if (cp == NULL || cp->valid == 0)
return NULL;
else