diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-30 00:23:05 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-30 00:23:05 +0000 |
commit | 82a6a487475d9c6827a84edc322f636990294c0f (patch) | |
tree | 8d3e54dba44ffc98d7c12cab9a519ad7350ed89f /lib | |
parent | 0e2b08df8247b4d1baa9f47de99f7600d8841465 (diff) |
Add a const qualifier to the return value of BIO_s_file().
tested in a bulk build by sthen
ok bcook, jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/bio/bio.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/bio/bss_file.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 105d3ff3af0..2847d3729ef 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.43 2018/05/12 18:51:59 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.44 2018/05/30 00:23:04 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -597,7 +597,7 @@ BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, asn1_ps_func **psuffix_free); int BIO_get_new_index(void); -BIO_METHOD *BIO_s_file(void ); +const BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); BIO *BIO_new_fp(FILE *stream, int close_flag); # define BIO_s_file_internal BIO_s_file diff --git a/lib/libcrypto/bio/bss_file.c b/lib/libcrypto/bio/bss_file.c index 01f4a3ff3b4..fe937388b2c 100644 --- a/lib/libcrypto/bio/bss_file.c +++ b/lib/libcrypto/bio/bss_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_file.c,v 1.32 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: bss_file.c,v 1.33 2018/05/30 00:23:04 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,7 +98,7 @@ static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2); static int file_new(BIO *h); static int file_free(BIO *data); -static BIO_METHOD methods_filep = { +static const BIO_METHOD methods_filep = { .type = BIO_TYPE_FILE, .name = "FILE pointer", .bwrite = file_write, @@ -148,7 +148,7 @@ BIO_new_fp(FILE *stream, int close_flag) return (ret); } -BIO_METHOD * +const BIO_METHOD * BIO_s_file(void) { return (&methods_filep); |