diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-27 20:26:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-27 20:26:50 +0000 |
commit | e5cffcd34247f85edfdeb62a15a64dfbfbd449e0 (patch) | |
tree | da4996e6e0a1e6f377715dfbc7b3352529477cba /lib/libcrypto/dso | |
parent | a87db0183f55bcd74e22af7a30de8ff482d0495b (diff) |
Use C99 initializers for the various FOO_METHOD structs. More readable, and
avoid unreadable/unmaintainable constructs like that:
const EVP_PKEY_ASN1_METHOD cmac_asn1_meth =
{
EVP_PKEY_CMAC,
EVP_PKEY_CMAC,
0,
"CMAC",
"OpenSSL CMAC method",
0,0,0,0,
0,0,0,
cmac_size,
0,
0,0,0,0,0,0,0,
cmac_key_free,
0,
0,0
};
ok matthew@ deraadt@
Diffstat (limited to 'lib/libcrypto/dso')
-rw-r--r-- | lib/libcrypto/dso/dso_dlfcn.c | 26 | ||||
-rw-r--r-- | lib/libcrypto/dso/dso_null.c | 18 |
2 files changed, 10 insertions, 34 deletions
diff --git a/lib/libcrypto/dso/dso_dlfcn.c b/lib/libcrypto/dso/dso_dlfcn.c index 6cf9ab2667d..bebfdcdbc41 100644 --- a/lib/libcrypto/dso/dso_dlfcn.c +++ b/lib/libcrypto/dso/dso_dlfcn.c @@ -93,23 +93,15 @@ static int dlfcn_pathbyaddr(void *addr, char *path, int sz); static void *dlfcn_globallookup(const char *name); static DSO_METHOD dso_meth_dlfcn = { - "OpenSSL 'dlfcn' shared library method", - dlfcn_load, - dlfcn_unload, - dlfcn_bind_var, - dlfcn_bind_func, -/* For now, "unbind" doesn't exist */ -#if 0 - NULL, /* unbind_var */ - NULL, /* unbind_func */ -#endif - NULL, /* ctrl */ - dlfcn_name_converter, - dlfcn_merger, - NULL, /* init */ - NULL, /* finish */ - dlfcn_pathbyaddr, - dlfcn_globallookup + .name = "OpenSSL 'dlfcn' shared library method", + .dso_load = dlfcn_load, + .dso_unload = dlfcn_unload, + .dso_bind_var = dlfcn_bind_var, + .dso_bind_func = dlfcn_bind_func, + .dso_name_converter = dlfcn_name_converter, + .dso_merger = dlfcn_merger, + .pathbyaddr = dlfcn_pathbyaddr, + .globallookup = dlfcn_globallookup }; DSO_METHOD * diff --git a/lib/libcrypto/dso/dso_null.c b/lib/libcrypto/dso/dso_null.c index 0c877ab2f26..c9f4226cb5f 100644 --- a/lib/libcrypto/dso/dso_null.c +++ b/lib/libcrypto/dso/dso_null.c @@ -64,23 +64,7 @@ #include <openssl/dso.h> static DSO_METHOD dso_meth_null = { - "NULL shared library method", - NULL, /* load */ - NULL, /* unload */ - NULL, /* bind_var */ - NULL, /* bind_func */ -/* For now, "unbind" doesn't exist */ -#if 0 - NULL, /* unbind_var */ - NULL, /* unbind_func */ -#endif - NULL, /* ctrl */ - NULL, /* dso_name_converter */ - NULL, /* dso_merger */ - NULL, /* init */ - NULL, /* finish */ - NULL, /* pathbyaddr */ - NULL /* globallookup */ + .name = "NULL shared library method" }; DSO_METHOD * |