diff options
| author | tb <> | 2018-05-30 00:23:04 +0000 |
|---|---|---|
| committer | tb <> | 2018-05-30 00:23:04 +0000 |
| commit | ba417c1f27f6729e06c935d52544e49aa831b602 (patch) | |
| tree | 814ed62063ff21a384142de872598d0baf677d1e | |
| parent | 66a7482cb9234517db97892bb0724012c91123d8 (diff) | |
| download | openbsd-ba417c1f27f6729e06c935d52544e49aa831b602.tar.gz openbsd-ba417c1f27f6729e06c935d52544e49aa831b602.tar.bz2 openbsd-ba417c1f27f6729e06c935d52544e49aa831b602.zip | |
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 '')
| -rw-r--r-- | src/lib/libcrypto/bio/bio.h | 4 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | /* $OpenBSD: bio.h,v 1.43 2018/05/12 18:51:59 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.44 2018/05/30 00:23:04 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 | * |
| @@ -597,7 +597,7 @@ BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, | |||
| 597 | asn1_ps_func **psuffix_free); | 597 | asn1_ps_func **psuffix_free); |
| 598 | 598 | ||
| 599 | int BIO_get_new_index(void); | 599 | int BIO_get_new_index(void); |
| 600 | BIO_METHOD *BIO_s_file(void ); | 600 | const BIO_METHOD *BIO_s_file(void); |
| 601 | BIO *BIO_new_file(const char *filename, const char *mode); | 601 | BIO *BIO_new_file(const char *filename, const char *mode); |
| 602 | BIO *BIO_new_fp(FILE *stream, int close_flag); | 602 | BIO *BIO_new_fp(FILE *stream, int close_flag); |
| 603 | # define BIO_s_file_internal BIO_s_file | 603 | # 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 @@ | |||
| 1 | /* $OpenBSD: bss_file.c,v 1.32 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: bss_file.c,v 1.33 2018/05/30 00:23:04 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 | * |
| @@ -98,7 +98,7 @@ static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2); | |||
| 98 | static int file_new(BIO *h); | 98 | static int file_new(BIO *h); |
| 99 | static int file_free(BIO *data); | 99 | static int file_free(BIO *data); |
| 100 | 100 | ||
| 101 | static BIO_METHOD methods_filep = { | 101 | static const BIO_METHOD methods_filep = { |
| 102 | .type = BIO_TYPE_FILE, | 102 | .type = BIO_TYPE_FILE, |
| 103 | .name = "FILE pointer", | 103 | .name = "FILE pointer", |
| 104 | .bwrite = file_write, | 104 | .bwrite = file_write, |
| @@ -148,7 +148,7 @@ BIO_new_fp(FILE *stream, int close_flag) | |||
| 148 | return (ret); | 148 | return (ret); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | BIO_METHOD * | 151 | const BIO_METHOD * |
| 152 | BIO_s_file(void) | 152 | BIO_s_file(void) |
| 153 | { | 153 | { |
| 154 | return (&methods_filep); | 154 | return (&methods_filep); |
