diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
commit | 26a3a48d65c7464b400ec1de439994d7f0d25fed (patch) | |
tree | 91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/stack | |
parent | de42b6a7a82be33d2976ab605e74d7bc95b71447 (diff) |
There have been a number of complaints from a number of sources that names
like Malloc, Realloc and especially Free conflict with already existing names
on some operating systems or other packages. That is reason enough to change
the names of the OpenSSL memory allocation macros to something that has a
better chance of being unique, like prepending them with OPENSSL_.
This change includes all the name changes needed throughout all C files.
Diffstat (limited to 'crypto/stack')
-rw-r--r-- | crypto/stack/stack.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 8f57daa6f4..d2c640075b 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -94,7 +94,7 @@ STACK *sk_dup(STACK *sk) char **s; if ((ret=sk_new(sk->comp)) == NULL) goto err; - s=(char **)Realloc((char *)ret->data, + s=(char **)OPENSSL_realloc((char *)ret->data, (unsigned int)sizeof(char *)*sk->num_alloc); if (s == NULL) goto err; ret->data=s; @@ -114,9 +114,9 @@ STACK *sk_new(int (*c)(const char * const *, const char * const *)) STACK *ret; int i; - if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL) + if ((ret=(STACK *)OPENSSL_malloc(sizeof(STACK))) == NULL) goto err0; - if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL) + if ((ret->data=(char **)OPENSSL_malloc(sizeof(char *)*MIN_NODES)) == NULL) goto err1; for (i=0; i<MIN_NODES; i++) ret->data[i]=NULL; @@ -126,7 +126,7 @@ STACK *sk_new(int (*c)(const char * const *, const char * const *)) ret->sorted=0; return(ret); err1: - Free(ret); + OPENSSL_free(ret); err0: return(NULL); } @@ -138,7 +138,7 @@ int sk_insert(STACK *st, char *data, int loc) if(st == NULL) return 0; if (st->num_alloc <= st->num+1) { - s=(char **)Realloc((char *)st->data, + s=(char **)OPENSSL_realloc((char *)st->data, (unsigned int)sizeof(char *)*st->num_alloc*2); if (s == NULL) return(0); @@ -287,8 +287,8 @@ void sk_pop_free(STACK *st, void (*func)(void *)) void sk_free(STACK *st) { if (st == NULL) return; - if (st->data != NULL) Free(st->data); - Free(st); + if (st->data != NULL) OPENSSL_free(st->data); + OPENSSL_free(st); } int sk_num(const STACK *st) |