diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-12 17:47:54 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-12 17:47:54 +0000 |
commit | f549c59737e7f801e323f8839bbbd7c3f3ffa5cb (patch) | |
tree | 26b41af7d2a22ec102f24880b73db02162823e3d /lib/libcrypto | |
parent | 835d65b42514a9d3c7908dd3b963eb1231664253 (diff) |
Add const qualifiers to the return values of BIO_s_mem() and
BIO_s_datagram().
ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/bio/bio.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/bio/bss_dgram.c | 6 | ||||
-rw-r--r-- | lib/libcrypto/bio/bss_mem.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 8a473ca20ab..678155c34e6 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.41 2018/05/01 13:29:09 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.42 2018/05/12 17:47:53 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -641,7 +641,7 @@ int BIO_nwrite(BIO *bio, char **buf, int num); long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); -BIO_METHOD *BIO_s_mem(void); +const BIO_METHOD *BIO_s_mem(void); BIO *BIO_new_mem_buf(void *buf, int len); const BIO_METHOD *BIO_s_socket(void); const BIO_METHOD *BIO_s_connect(void); @@ -654,7 +654,7 @@ const BIO_METHOD *BIO_f_null(void); const BIO_METHOD *BIO_f_buffer(void); const BIO_METHOD *BIO_f_nbio_test(void); #ifndef OPENSSL_NO_DGRAM -BIO_METHOD *BIO_s_datagram(void); +const BIO_METHOD *BIO_s_datagram(void); #endif /* BIO_METHOD *BIO_f_ber(void); */ diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c index a9657402ce6..794b6d1b56a 100644 --- a/lib/libcrypto/bio/bss_dgram.c +++ b/lib/libcrypto/bio/bss_dgram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_dgram.c,v 1.41 2015/07/20 23:15:28 doug Exp $ */ +/* $OpenBSD: bss_dgram.c,v 1.42 2018/05/12 17:47:53 tb Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -86,7 +86,7 @@ static int dgram_clear(BIO *bio); static int BIO_dgram_should_retry(int s); -static BIO_METHOD methods_dgramp = { +static const BIO_METHOD methods_dgramp = { .type = BIO_TYPE_DGRAM, .name = "datagram socket", .bwrite = dgram_write, @@ -112,7 +112,7 @@ typedef struct bio_dgram_data_st { } bio_dgram_data; -BIO_METHOD * +const BIO_METHOD * BIO_s_datagram(void) { return (&methods_dgramp); diff --git a/lib/libcrypto/bio/bss_mem.c b/lib/libcrypto/bio/bss_mem.c index be491ca152d..a699dc51c30 100644 --- a/lib/libcrypto/bio/bss_mem.c +++ b/lib/libcrypto/bio/bss_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_mem.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: bss_mem.c,v 1.16 2018/05/12 17:47:53 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -72,7 +72,7 @@ static long mem_ctrl(BIO *h, int cmd, long arg1, void *arg2); static int mem_new(BIO *h); static int mem_free(BIO *data); -static BIO_METHOD mem_method = { +static const BIO_METHOD mem_method = { .type = BIO_TYPE_MEM, .name = "memory buffer", .bwrite = mem_write, @@ -87,7 +87,7 @@ static BIO_METHOD mem_method = { /* bio->num is used to hold the value to return on 'empty', if it is * 0, should_retry is not set */ -BIO_METHOD * +const BIO_METHOD * BIO_s_mem(void) { return (&mem_method); |