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/bio/bss_mem.c | |
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/bio/bss_mem.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_mem.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c index 1a477c12be..b147a8eccb 100644 --- a/src/lib/libcrypto/bio/bss_mem.c +++ b/src/lib/libcrypto/bio/bss_mem.c | |||
@@ -70,16 +70,15 @@ static int mem_new(BIO *h); | |||
70 | static int mem_free(BIO *data); | 70 | static int mem_free(BIO *data); |
71 | 71 | ||
72 | static BIO_METHOD mem_method = { | 72 | static BIO_METHOD mem_method = { |
73 | BIO_TYPE_MEM, | 73 | .type = BIO_TYPE_MEM, |
74 | "memory buffer", | 74 | .name = "memory buffer", |
75 | mem_write, | 75 | .bwrite = mem_write, |
76 | mem_read, | 76 | .bread = mem_read, |
77 | mem_puts, | 77 | .bputs = mem_puts, |
78 | mem_gets, | 78 | .bgets = mem_gets, |
79 | mem_ctrl, | 79 | .ctrl = mem_ctrl, |
80 | mem_new, | 80 | .create = mem_new, |
81 | mem_free, | 81 | .destroy = mem_free |
82 | NULL, | ||
83 | }; | 82 | }; |
84 | 83 | ||
85 | /* bio->num is used to hold the value to return on 'empty', if it is | 84 | /* bio->num is used to hold the value to return on 'empty', if it is |