diff options
author | David Benjamin <davidben@google.com> | 2016-03-19 12:32:14 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-21 16:49:10 -0400 |
commit | 04f6b0fd9110c85c3c0d6d1172005d1c6755ac86 (patch) | |
tree | 3ce2eb3e6743161c6753a5344424a8fe72a0d97e /crypto/bio/bss_file.c | |
parent | 52d86d9b8da9916acf337126a9ced850cb5ab2d3 (diff) | |
download | openssl-04f6b0fd9110c85c3c0d6d1172005d1c6755ac86.tar.gz |
RT4660: BIO_METHODs should be const.
BIO_new, etc., don't need a non-const BIO_METHOD. This allows all the
built-in method tables to live in .rodata.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r-- | crypto/bio/bss_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index d53d52bd14..643a855a8d 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -96,7 +96,7 @@ static int file_gets(BIO *h, char *str, int size); 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 = { BIO_TYPE_FILE, "FILE pointer", file_write, @@ -198,7 +198,7 @@ BIO *BIO_new_fp(FILE *stream, int close_flag) return (ret); } -BIO_METHOD *BIO_s_file(void) +const BIO_METHOD *BIO_s_file(void) { return (&methods_filep); } @@ -479,7 +479,7 @@ static int file_free(BIO *a) return 0; } -static BIO_METHOD methods_filep = { +static const BIO_METHOD methods_filep = { BIO_TYPE_FILE, "FILE pointer", file_write, @@ -492,7 +492,7 @@ static BIO_METHOD methods_filep = { NULL, }; -BIO_METHOD *BIO_s_file(void) +const BIO_METHOD *BIO_s_file(void) { return (&methods_filep); } |