projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GH601: Various spelling fixes.
[openssl.git]
/
crypto
/
engine
/
eng_table.c
diff --git
a/crypto/engine/eng_table.c
b/crypto/engine/eng_table.c
index 73e72fe3d341cec88e33487e92a403a4e89443b2..22390d2b4d23d13021bf84416cf11845fbc7a8c4 100644
(file)
--- a/
crypto/engine/eng_table.c
+++ b/
crypto/engine/eng_table.c
@@
-106,9
+106,6
@@
static int engine_pile_cmp(const ENGINE_PILE *a, const ENGINE_PILE *b)
return a->nid - b->nid;
}
return a->nid - b->nid;
}
-static IMPLEMENT_LHASH_HASH_FN(engine_pile, ENGINE_PILE)
-static IMPLEMENT_LHASH_COMP_FN(engine_pile, ENGINE_PILE)
-
static int int_table_check(ENGINE_TABLE **t, int create)
{
LHASH_OF(ENGINE_PILE) *lh;
static int int_table_check(ENGINE_TABLE **t, int create)
{
LHASH_OF(ENGINE_PILE) *lh;
@@
-117,7
+114,7
@@
static int int_table_check(ENGINE_TABLE **t, int create)
return 1;
if (!create)
return 0;
return 1;
if (!create)
return 0;
- if ((lh = lh_ENGINE_PILE_new()) == NULL)
+ if ((lh = lh_ENGINE_PILE_new(
engine_pile_hash, engine_pile_cmp
)) == NULL)
return 0;
*t = (ENGINE_TABLE *)lh;
return 1;
return 0;
*t = (ENGINE_TABLE *)lh;
return 1;
@@
-158,7
+155,7
@@
int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
fnd->funct = NULL;
(void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
}
fnd->funct = NULL;
(void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
}
- /* A registration shouldn't add dupl
ci
ate entries */
+ /* A registration shouldn't add dupl
ic
ate entries */
(void)sk_ENGINE_delete_ptr(fnd->sk, e);
/*
* if 'setdefault', this ENGINE goes to the head of the list
(void)sk_ENGINE_delete_ptr(fnd->sk, e);
/*
* if 'setdefault', this ENGINE goes to the head of the list
@@
-186,7
+183,7
@@
int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
return ret;
}
return ret;
}
-static void int_unregister_cb
_doall_arg
(ENGINE_PILE *pile, ENGINE *e)
+static void int_unregister_cb(ENGINE_PILE *pile, ENGINE *e)
{
int n;
/* Iterate the 'c->sk' stack removing any occurrence of 'e' */
{
int n;
/* Iterate the 'c->sk' stack removing any occurrence of 'e' */
@@
-200,15
+197,13
@@
static void int_unregister_cb_doall_arg(ENGINE_PILE *pile, ENGINE *e)
}
}
}
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(int_unregister_cb, ENGINE_PILE, ENGINE)
+IMPLEMENT_LHASH_DOALL_ARG(ENGINE_PILE, ENGINE);
void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e)
{
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
if (int_table_check(table, 0))
void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e)
{
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
if (int_table_check(table, 0))
- lh_ENGINE_PILE_doall_arg(&(*table)->piles,
- LHASH_DOALL_ARG_FN(int_unregister_cb),
- ENGINE, e);
+ lh_ENGINE_PILE_doall_ENGINE(&(*table)->piles, int_unregister_cb, e);
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
}
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
}
@@
-222,14
+217,11
@@
static void int_cleanup_cb_doall(ENGINE_PILE *p)
OPENSSL_free(p);
}
OPENSSL_free(p);
}
-static IMPLEMENT_LHASH_DOALL_FN(int_cleanup_cb, ENGINE_PILE)
-
void engine_table_cleanup(ENGINE_TABLE **table)
{
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
if (*table) {
void engine_table_cleanup(ENGINE_TABLE **table)
{
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
if (*table) {
- lh_ENGINE_PILE_doall(&(*table)->piles,
- LHASH_DOALL_FN(int_cleanup_cb));
+ lh_ENGINE_PILE_doall(&(*table)->piles, int_cleanup_cb_doall);
lh_ENGINE_PILE_free(&(*table)->piles);
*table = NULL;
}
lh_ENGINE_PILE_free(&(*table)->piles);
*table = NULL;
}
@@
-338,12
+330,12
@@
ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f,
/* Table enumeration */
/* Table enumeration */
-static void int_
cb_doall_arg(
ENGINE_PILE *pile, ENGINE_PILE_DOALL *dall)
+static void int_
dall(const
ENGINE_PILE *pile, ENGINE_PILE_DOALL *dall)
{
dall->cb(pile->nid, pile->sk, pile->funct, dall->arg);
}
{
dall->cb(pile->nid, pile->sk, pile->funct, dall->arg);
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(int_cb, ENGINE_PILE, ENGINE_PILE_DOALL)
+IMPLEMENT_LHASH_DOALL_ARG_CONST(ENGINE_PILE, ENGINE_PILE_DOALL);
void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
void *arg)
void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
void *arg)
@@
-352,7
+344,5
@@
void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
dall.cb = cb;
dall.arg = arg;
if (table)
dall.cb = cb;
dall.arg = arg;
if (table)
- lh_ENGINE_PILE_doall_arg(&table->piles,
- LHASH_DOALL_ARG_FN(int_cb),
- ENGINE_PILE_DOALL, &dall);
+ lh_ENGINE_PILE_doall_ENGINE_PILE_DOALL(&table->piles, int_dall, &dall);
}
}