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