diff options
author | tb <> | 2018-05-12 17:47:53 +0000 |
---|---|---|
committer | tb <> | 2018-05-12 17:47:53 +0000 |
commit | d179dae307ac7f37cfdcb0967d16dd7186146e55 (patch) | |
tree | 9640075a182e16820fe72579b61fa8385d40e591 /src/lib | |
parent | 4472f3d68a4cfdda378061fd79bb5cfbb348752d (diff) | |
download | openbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.tar.gz openbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.tar.bz2 openbsd-d179dae307ac7f37cfdcb0967d16dd7186146e55.zip |
Add const qualifiers to the return values of BIO_s_mem() and
BIO_s_datagram().
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bss_dgram.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/bss_mem.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 8a473ca20a..678155c34e 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio.h,v 1.41 2018/05/01 13:29:09 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.42 2018/05/12 17:47:53 tb 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 | * |
@@ -641,7 +641,7 @@ int BIO_nwrite(BIO *bio, char **buf, int num); | |||
641 | long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, | 641 | long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, |
642 | long argl, long ret); | 642 | long argl, long ret); |
643 | 643 | ||
644 | BIO_METHOD *BIO_s_mem(void); | 644 | const BIO_METHOD *BIO_s_mem(void); |
645 | BIO *BIO_new_mem_buf(void *buf, int len); | 645 | BIO *BIO_new_mem_buf(void *buf, int len); |
646 | const BIO_METHOD *BIO_s_socket(void); | 646 | const BIO_METHOD *BIO_s_socket(void); |
647 | const BIO_METHOD *BIO_s_connect(void); | 647 | const BIO_METHOD *BIO_s_connect(void); |
@@ -654,7 +654,7 @@ const BIO_METHOD *BIO_f_null(void); | |||
654 | const BIO_METHOD *BIO_f_buffer(void); | 654 | const BIO_METHOD *BIO_f_buffer(void); |
655 | const BIO_METHOD *BIO_f_nbio_test(void); | 655 | const BIO_METHOD *BIO_f_nbio_test(void); |
656 | #ifndef OPENSSL_NO_DGRAM | 656 | #ifndef OPENSSL_NO_DGRAM |
657 | BIO_METHOD *BIO_s_datagram(void); | 657 | const BIO_METHOD *BIO_s_datagram(void); |
658 | #endif | 658 | #endif |
659 | 659 | ||
660 | /* BIO_METHOD *BIO_f_ber(void); */ | 660 | /* BIO_METHOD *BIO_f_ber(void); */ |
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index a9657402ce..794b6d1b56 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bss_dgram.c,v 1.41 2015/07/20 23:15:28 doug Exp $ */ | 1 | /* $OpenBSD: bss_dgram.c,v 1.42 2018/05/12 17:47:53 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -86,7 +86,7 @@ static int dgram_clear(BIO *bio); | |||
86 | 86 | ||
87 | static int BIO_dgram_should_retry(int s); | 87 | static int BIO_dgram_should_retry(int s); |
88 | 88 | ||
89 | static BIO_METHOD methods_dgramp = { | 89 | static const BIO_METHOD methods_dgramp = { |
90 | .type = BIO_TYPE_DGRAM, | 90 | .type = BIO_TYPE_DGRAM, |
91 | .name = "datagram socket", | 91 | .name = "datagram socket", |
92 | .bwrite = dgram_write, | 92 | .bwrite = dgram_write, |
@@ -112,7 +112,7 @@ typedef struct bio_dgram_data_st { | |||
112 | } bio_dgram_data; | 112 | } bio_dgram_data; |
113 | 113 | ||
114 | 114 | ||
115 | BIO_METHOD * | 115 | const BIO_METHOD * |
116 | BIO_s_datagram(void) | 116 | BIO_s_datagram(void) |
117 | { | 117 | { |
118 | return (&methods_dgramp); | 118 | return (&methods_dgramp); |
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c index be491ca152..a699dc51c3 100644 --- a/src/lib/libcrypto/bio/bss_mem.c +++ b/src/lib/libcrypto/bio/bss_mem.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bss_mem.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: bss_mem.c,v 1.16 2018/05/12 17:47:53 tb 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 | * |
@@ -72,7 +72,7 @@ static long mem_ctrl(BIO *h, int cmd, long arg1, void *arg2); | |||
72 | static int mem_new(BIO *h); | 72 | static int mem_new(BIO *h); |
73 | static int mem_free(BIO *data); | 73 | static int mem_free(BIO *data); |
74 | 74 | ||
75 | static BIO_METHOD mem_method = { | 75 | static const BIO_METHOD mem_method = { |
76 | .type = BIO_TYPE_MEM, | 76 | .type = BIO_TYPE_MEM, |
77 | .name = "memory buffer", | 77 | .name = "memory buffer", |
78 | .bwrite = mem_write, | 78 | .bwrite = mem_write, |
@@ -87,7 +87,7 @@ static BIO_METHOD mem_method = { | |||
87 | /* bio->num is used to hold the value to return on 'empty', if it is | 87 | /* bio->num is used to hold the value to return on 'empty', if it is |
88 | * 0, should_retry is not set */ | 88 | * 0, should_retry is not set */ |
89 | 89 | ||
90 | BIO_METHOD * | 90 | const BIO_METHOD * |
91 | BIO_s_mem(void) | 91 | BIO_s_mem(void) |
92 | { | 92 | { |
93 | return (&mem_method); | 93 | return (&mem_method); |