From ca7066ca92ab7567464f37cf40bfc611eac214ff Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 31 Mar 2019 14:39:15 +0000 Subject: Use named field initialisers. --- src/lib/libcrypto/asn1/x_bignum.c | 17 +++++++++-------- src/lib/libcrypto/asn1/x_long.c | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/asn1/x_bignum.c b/src/lib/libcrypto/asn1/x_bignum.c index 73f0f73c1c..a5a307eff7 100644 --- a/src/lib/libcrypto/asn1/x_bignum.c +++ b/src/lib/libcrypto/asn1/x_bignum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_bignum.c,v 1.8 2015/07/25 17:07:17 jsing Exp $ */ +/* $OpenBSD: x_bignum.c,v 1.9 2019/03/31 14:39:15 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -77,13 +77,14 @@ static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); static ASN1_PRIMITIVE_FUNCS bignum_pf = { - NULL, - 0, - bn_new, - bn_free, - 0, - bn_c2i, - bn_i2c + .app_data = NULL, + .flags = 0, + .prim_new = bn_new, + .prim_free = bn_free, + .prim_clear = NULL, /* XXX */ + .prim_c2i = bn_c2i, + .prim_i2c = bn_i2c, + .prim_print = NULL, }; const ASN1_ITEM BIGNUM_it = { diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c index 9df3a3181a..b598937dcd 100644 --- a/src/lib/libcrypto/asn1/x_long.c +++ b/src/lib/libcrypto/asn1/x_long.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_long.c,v 1.11 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: x_long.c,v 1.12 2019/03/31 14:39:15 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -76,13 +76,14 @@ static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int u static int long_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, const ASN1_PCTX *pctx); static ASN1_PRIMITIVE_FUNCS long_pf = { - NULL, 0, - long_new, - long_free, - long_free, /* Clear should set to initial value */ - long_c2i, - long_i2c, - long_print + .app_data = NULL, + .flags = 0, + .prim_new = long_new, + .prim_free = long_free, + .prim_clear = long_free, /* Clear should set to initial value */ + .prim_c2i = long_c2i, + .prim_i2c = long_i2c, + .prim_print = long_print, }; const ASN1_ITEM LONG_it = { -- cgit v1.2.3-55-g6feb