diff options
author | Ben Laurie <ben@openssl.org> | 1999-10-23 11:30:09 +0200 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-10-23 11:30:09 +0200 |
commit | 042a93e443732418df4714d217ccc0b35cdc4eb5 (patch) | |
tree | 7d572b0bc6b75f3946d959cb3a5cfa49981ec1c8 /crypto | |
parent | Don't return stuff from void functions. (diff) | |
download | openssl-042a93e443732418df4714d217ccc0b35cdc4eb5.tar.xz openssl-042a93e443732418df4714d217ccc0b35cdc4eb5.zip |
Constification.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/a_mbstr.c | 8 | ||||
-rw-r--r-- | crypto/asn1/a_utf8.c | 4 | ||||
-rw-r--r-- | crypto/asn1/asn1.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c index 260c1aff0d..ce413ec3de 100644 --- a/crypto/asn1/a_mbstr.c +++ b/crypto/asn1/a_mbstr.c @@ -60,7 +60,7 @@ #include "cryptlib.h" #include <openssl/asn1.h> -static int traverse_string(unsigned char *p, int len, int inform, +static int traverse_string(const unsigned char *p, int len, int inform, int (*rfunc)(unsigned long value, void *in), void *arg); static int in_utf8(unsigned long value, void *arg); static int out_utf8(unsigned long value, void *arg); @@ -78,8 +78,8 @@ static int is_printable(unsigned long value); * Yes this is horrible: it has to be :-( */ -int ASN1_mbstring_copy(ASN1_STRING **out, unsigned char *in, int len, - int inform, unsigned long mask) +int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, + int inform, unsigned long mask) { int str_type; int ret; @@ -206,7 +206,7 @@ int ASN1_mbstring_copy(ASN1_STRING **out, unsigned char *in, int len, * to an optional function along with a void * argument. */ -static int traverse_string(unsigned char *p, int len, int inform, +static int traverse_string(const unsigned char *p, int len, int inform, int (*rfunc)(unsigned long value, void *in), void *arg) { unsigned long value; diff --git a/crypto/asn1/a_utf8.c b/crypto/asn1/a_utf8.c index 45434be4fa..b5125af224 100644 --- a/crypto/asn1/a_utf8.c +++ b/crypto/asn1/a_utf8.c @@ -100,9 +100,9 @@ ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, unsigned char **pp, * -4 = character encoded incorrectly (not minimal length). */ -int UTF8_getc(unsigned char *str, int len, unsigned long *val) +int UTF8_getc(const unsigned char *str, int len, unsigned long *val) { - unsigned char *p; + const unsigned char *p; unsigned long value; int ret; if(len <= 0) return 0; diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 832611b713..fb2007322c 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -563,7 +563,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, unsigned char **pp, long length); -int UTF8_getc(unsigned char *str, int len, unsigned long *val); +int UTF8_getc(const unsigned char *str, int len, unsigned long *val); int UTF8_putc(unsigned char *str, int len, unsigned long value); int i2d_ASN1_PRINTABLE(ASN1_STRING *a,unsigned char **pp); @@ -718,7 +718,7 @@ unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, int *len ); void *ASN1_unpack_string(ASN1_STRING *oct, char *(*d2i)()); ASN1_STRING *ASN1_pack_string(void *obj, int (*i2d)(), ASN1_OCTET_STRING **oct); -int ASN1_mbstring_copy(ASN1_STRING **out, unsigned char *in, int len, +int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, int inform, unsigned long mask); /* BEGIN ERROR CODES */ |