From 45bb7f0ae87ddf787dd06d515db9afb04a74bf6c Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 27 Apr 2014 20:26:49 +0000 Subject: 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@ --- src/lib/libcrypto/bio/bss_conn.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/lib/libcrypto/bio/bss_conn.c') diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index d7a8619b38..7ed8f1fe31 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c @@ -103,16 +103,15 @@ BIO_CONNECT *BIO_CONNECT_new(void); void BIO_CONNECT_free(BIO_CONNECT *a); static BIO_METHOD methods_connectp = { - BIO_TYPE_CONNECT, - "socket connect", - conn_write, - conn_read, - conn_puts, - NULL, /* connect_gets, */ - conn_ctrl, - conn_new, - conn_free, - conn_callback_ctrl, + .type = BIO_TYPE_CONNECT, + .name = "socket connect", + .bwrite = conn_write, + .bread = conn_read, + .bputs = conn_puts, + .ctrl = conn_ctrl, + .create = conn_new, + .destroy = conn_free, + .callback_ctrl = conn_callback_ctrl }; static int -- cgit v1.2.3-55-g6feb