diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
commit | 61f5b6f33807306d09bccbc2dcad474d1d04ca40 (patch) | |
tree | 1680fa648df5f730df11ec433a512a1fadf0facd /crypto/asn1/asn1_lib.c | |
parent | 779cc0bca98e35830db455f34b986b86a2d2f822 (diff) | |
download | openssl-new-61f5b6f33807306d09bccbc2dcad474d1d04ca40.tar.gz |
Work with -pedantic!
Diffstat (limited to 'crypto/asn1/asn1_lib.c')
-rw-r--r-- | crypto/asn1/asn1_lib.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 8c5d2d80ed..f67ed0fc86 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -324,28 +324,29 @@ ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str) return(ret); } -int ASN1_STRING_set(ASN1_STRING *str, unsigned char *data, int len) +int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) { - char *c; + unsigned char *c; + const char *data=_data; if (len < 0) { if (data == NULL) return(0); else - len=strlen((char *)data); + len=strlen(data); } if ((str->length < len) || (str->data == NULL)) { - c=(char *)str->data; + c=str->data; if (c == NULL) - str->data=(unsigned char *)Malloc(len+1); + str->data=Malloc(len+1); else - str->data=(unsigned char *)Realloc(c,len+1); + str->data=Realloc(c,len+1); if (str->data == NULL) { - str->data=(unsigned char *)c; + str->data=c; return(0); } } |