diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-12-24 17:20:54 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-11 18:50:27 +0100 |
commit | 2a056de832a62f9c6da67779f3764f004df6fdb0 (patch) | |
tree | 39cf79ccb16c14d4fdc208f58447a051266a8f66 /crypto/objects/o_names.c | |
parent | Add lh_doall inlining (diff) | |
download | openssl-2a056de832a62f9c6da67779f3764f004df6fdb0.tar.xz openssl-2a056de832a62f9c6da67779f3764f004df6fdb0.zip |
Add lh_doall_arg inlining
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/objects/o_names.c')
-rw-r--r-- | crypto/objects/o_names.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index d63575dc84..6939b9abc7 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -234,31 +234,30 @@ int OBJ_NAME_remove(const char *name, int type) return (0); } -struct doall { +typedef struct { int type; void (*fn) (const OBJ_NAME *, void *arg); void *arg; -}; +} OBJ_DOALL; -static void do_all_fn_doall_arg(const OBJ_NAME *name, struct doall *d) +static void do_all_fn(const OBJ_NAME *name, OBJ_DOALL *d) { if (name->type == d->type) d->fn(name, d->arg); } -static IMPLEMENT_LHASH_DOALL_ARG_FN(do_all_fn, const OBJ_NAME, struct doall) +IMPLEMENT_LHASH_DOALL_ARG_CONST(OBJ_NAME, OBJ_DOALL); void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg), void *arg) { - struct doall d; + OBJ_DOALL d; d.type = type; d.fn = fn; d.arg = arg; - lh_OBJ_NAME_doall_arg(names_lh, LHASH_DOALL_ARG_FN(do_all_fn), - struct doall, &d); + lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d); } struct doall_sorted { |