summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2015-07-29 14:53:20 +0000
committerjsing <>2015-07-29 14:53:20 +0000
commitef1330e743f37f67eea11df4f4993267e06531dd (patch)
tree665c0ade2b369306af89bcff6bb40bf7b133fb4b /src
parente111baa13f44b70338db94543fb1b4be272de880 (diff)
downloadopenbsd-ef1330e743f37f67eea11df4f4993267e06531dd.tar.gz
openbsd-ef1330e743f37f67eea11df4f4993267e06531dd.tar.bz2
openbsd-ef1330e743f37f67eea11df4f4993267e06531dd.zip
Expand obsolete M_ASN1_STRING_* macros in asn1_lib.c, apply some style(9)
and drop an unnecessary return from a void function. ok bcook@ doug@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/asn1/asn1_lib.c11
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn1_lib.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c
index 383d604e60..5d14a2780f 100644
--- a/src/lib/libcrypto/asn1/asn1_lib.c
+++ b/src/lib/libcrypto/asn1/asn1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_lib.c,v 1.35 2015/07/27 12:53:56 jsing Exp $ */ 1/* $OpenBSD: asn1_lib.c,v 1.36 2015/07/29 14:53:20 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -464,24 +464,23 @@ asn1_add_error(const unsigned char *address, int offset)
464int 464int
465ASN1_STRING_length(const ASN1_STRING *x) 465ASN1_STRING_length(const ASN1_STRING *x)
466{ 466{
467 return M_ASN1_STRING_length(x); 467 return (x->length);
468} 468}
469 469
470void 470void
471ASN1_STRING_length_set(ASN1_STRING *x, int len) 471ASN1_STRING_length_set(ASN1_STRING *x, int len)
472{ 472{
473 M_ASN1_STRING_length_set(x, len); 473 x->length = len;
474 return;
475} 474}
476 475
477int 476int
478ASN1_STRING_type(ASN1_STRING *x) 477ASN1_STRING_type(ASN1_STRING *x)
479{ 478{
480 return M_ASN1_STRING_type(x); 479 return (x->type);
481} 480}
482 481
483unsigned char * 482unsigned char *
484ASN1_STRING_data(ASN1_STRING *x) 483ASN1_STRING_data(ASN1_STRING *x)
485{ 484{
486 return M_ASN1_STRING_data(x); 485 return (x->data);
487} 486}
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c
index 383d604e60..5d14a2780f 100644
--- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c
+++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_lib.c,v 1.35 2015/07/27 12:53:56 jsing Exp $ */ 1/* $OpenBSD: asn1_lib.c,v 1.36 2015/07/29 14:53:20 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -464,24 +464,23 @@ asn1_add_error(const unsigned char *address, int offset)
464int 464int
465ASN1_STRING_length(const ASN1_STRING *x) 465ASN1_STRING_length(const ASN1_STRING *x)
466{ 466{
467 return M_ASN1_STRING_length(x); 467 return (x->length);
468} 468}
469 469
470void 470void
471ASN1_STRING_length_set(ASN1_STRING *x, int len) 471ASN1_STRING_length_set(ASN1_STRING *x, int len)
472{ 472{
473 M_ASN1_STRING_length_set(x, len); 473 x->length = len;
474 return;
475} 474}
476 475
477int 476int
478ASN1_STRING_type(ASN1_STRING *x) 477ASN1_STRING_type(ASN1_STRING *x)
479{ 478{
480 return M_ASN1_STRING_type(x); 479 return (x->type);
481} 480}
482 481
483unsigned char * 482unsigned char *
484ASN1_STRING_data(ASN1_STRING *x) 483ASN1_STRING_data(ASN1_STRING *x)
485{ 484{
486 return M_ASN1_STRING_data(x); 485 return (x->data);
487} 486}