From 404620984af378ba4d050f61e4216c4e72f62f8b Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 30 May 2018 00:23:04 +0000 Subject: Add a const qualifier to the return value of BIO_s_file(). tested in a bulk build by sthen ok bcook, jsing --- src/lib/libcrypto/bio/bio.h | 4 ++-- src/lib/libcrypto/bio/bss_file.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 105d3ff3af..2847d3729e 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/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/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c index 01f4a3ff3b..fe937388b2 100644 --- a/src/lib/libcrypto/bio/bss_file.c +++ b/src/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); -- cgit v1.2.3-55-g6feb