diff options
| author | miod <> | 2014-04-27 20:26:49 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-27 20:26:49 +0000 |
| commit | 45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch) | |
| tree | 319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/dso | |
| parent | cbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff) | |
| download | openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.gz openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.bz2 openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.zip | |
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 'src/lib/libcrypto/dso')
| -rw-r--r-- | src/lib/libcrypto/dso/dso_dlfcn.c | 26 | ||||
| -rw-r--r-- | src/lib/libcrypto/dso/dso_null.c | 18 |
2 files changed, 10 insertions, 34 deletions
diff --git a/src/lib/libcrypto/dso/dso_dlfcn.c b/src/lib/libcrypto/dso/dso_dlfcn.c index 6cf9ab2667..bebfdcdbc4 100644 --- a/src/lib/libcrypto/dso/dso_dlfcn.c +++ b/src/lib/libcrypto/dso/dso_dlfcn.c | |||
| @@ -93,23 +93,15 @@ static int dlfcn_pathbyaddr(void *addr, char *path, int sz); | |||
| 93 | static void *dlfcn_globallookup(const char *name); | 93 | static void *dlfcn_globallookup(const char *name); |
| 94 | 94 | ||
| 95 | static DSO_METHOD dso_meth_dlfcn = { | 95 | static DSO_METHOD dso_meth_dlfcn = { |
| 96 | "OpenSSL 'dlfcn' shared library method", | 96 | .name = "OpenSSL 'dlfcn' shared library method", |
| 97 | dlfcn_load, | 97 | .dso_load = dlfcn_load, |
| 98 | dlfcn_unload, | 98 | .dso_unload = dlfcn_unload, |
| 99 | dlfcn_bind_var, | 99 | .dso_bind_var = dlfcn_bind_var, |
| 100 | dlfcn_bind_func, | 100 | .dso_bind_func = dlfcn_bind_func, |
| 101 | /* For now, "unbind" doesn't exist */ | 101 | .dso_name_converter = dlfcn_name_converter, |
| 102 | #if 0 | 102 | .dso_merger = dlfcn_merger, |
| 103 | NULL, /* unbind_var */ | 103 | .pathbyaddr = dlfcn_pathbyaddr, |
| 104 | NULL, /* unbind_func */ | 104 | .globallookup = dlfcn_globallookup |
| 105 | #endif | ||
| 106 | NULL, /* ctrl */ | ||
| 107 | dlfcn_name_converter, | ||
| 108 | dlfcn_merger, | ||
| 109 | NULL, /* init */ | ||
| 110 | NULL, /* finish */ | ||
| 111 | dlfcn_pathbyaddr, | ||
| 112 | dlfcn_globallookup | ||
| 113 | }; | 105 | }; |
| 114 | 106 | ||
| 115 | DSO_METHOD * | 107 | DSO_METHOD * |
diff --git a/src/lib/libcrypto/dso/dso_null.c b/src/lib/libcrypto/dso/dso_null.c index 0c877ab2f2..c9f4226cb5 100644 --- a/src/lib/libcrypto/dso/dso_null.c +++ b/src/lib/libcrypto/dso/dso_null.c | |||
| @@ -64,23 +64,7 @@ | |||
| 64 | #include <openssl/dso.h> | 64 | #include <openssl/dso.h> |
| 65 | 65 | ||
| 66 | static DSO_METHOD dso_meth_null = { | 66 | static DSO_METHOD dso_meth_null = { |
| 67 | "NULL shared library method", | 67 | .name = "NULL shared library method" |
| 68 | NULL, /* load */ | ||
| 69 | NULL, /* unload */ | ||
| 70 | NULL, /* bind_var */ | ||
| 71 | NULL, /* bind_func */ | ||
| 72 | /* For now, "unbind" doesn't exist */ | ||
| 73 | #if 0 | ||
| 74 | NULL, /* unbind_var */ | ||
| 75 | NULL, /* unbind_func */ | ||
| 76 | #endif | ||
| 77 | NULL, /* ctrl */ | ||
| 78 | NULL, /* dso_name_converter */ | ||
| 79 | NULL, /* dso_merger */ | ||
| 80 | NULL, /* init */ | ||
| 81 | NULL, /* finish */ | ||
| 82 | NULL, /* pathbyaddr */ | ||
| 83 | NULL /* globallookup */ | ||
| 84 | }; | 68 | }; |
| 85 | 69 | ||
| 86 | DSO_METHOD * | 70 | DSO_METHOD * |
