projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the algorithm implementations depend on the corresponding
[oweals/openssl.git]
/
crypto
/
buffer
/
buffer.c
diff --git
a/crypto/buffer/buffer.c
b/crypto/buffer/buffer.c
index b160a74a473c2d317fe846274804c0db922d0925..b76ff3ad7acf24302a039e246455c34561fecfc7 100644
(file)
--- a/
crypto/buffer/buffer.c
+++ b/
crypto/buffer/buffer.c
@@
-58,13
+58,13
@@
#include <stdio.h>
#include "cryptlib.h"
#include <stdio.h>
#include "cryptlib.h"
-#include
"buffer.h"
+#include
<openssl/buffer.h>
-BUF_MEM *BUF_MEM_new()
+BUF_MEM *BUF_MEM_new(
void
)
{
BUF_MEM *ret;
{
BUF_MEM *ret;
- ret=
(BUF_MEM *)M
alloc(sizeof(BUF_MEM));
+ ret=
OPENSSL_m
alloc(sizeof(BUF_MEM));
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
@@
-76,8
+76,7
@@
BUF_MEM *BUF_MEM_new()
return(ret);
}
return(ret);
}
-void BUF_MEM_free(a)
-BUF_MEM *a;
+void BUF_MEM_free(BUF_MEM *a)
{
if(a == NULL)
return;
{
if(a == NULL)
return;
@@
-85,14
+84,12
@@
BUF_MEM *a;
if (a->data != NULL)
{
memset(a->data,0,(unsigned int)a->max);
if (a->data != NULL)
{
memset(a->data,0,(unsigned int)a->max);
-
F
ree(a->data);
+
OPENSSL_f
ree(a->data);
}
}
-
F
ree(a);
+
OPENSSL_f
ree(a);
}
}
-int BUF_MEM_grow(str, len)
-BUF_MEM *str;
-int len;
+int BUF_MEM_grow(BUF_MEM *str, int len)
{
char *ret;
unsigned int n;
{
char *ret;
unsigned int n;
@@
-104,15
+101,15
@@
int len;
}
if (str->max >= len)
{
}
if (str->max >= len)
{
- memset(&
(str->data[str->length])
,0,len-str->length);
+ memset(&
str->data[str->length]
,0,len-str->length);
str->length=len;
return(len);
}
n=(len+3)/3*4;
if (str->data == NULL)
str->length=len;
return(len);
}
n=(len+3)/3*4;
if (str->data == NULL)
- ret=
(char *)M
alloc(n);
+ ret=
OPENSSL_m
alloc(n);
else
else
- ret=
(char *)R
ealloc(str->data,n);
+ ret=
OPENSSL_r
ealloc(str->data,n);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
@@
-127,8
+124,7
@@
int len;
return(len);
}
return(len);
}
-char *BUF_strdup(str)
-char *str;
+char *BUF_strdup(const char *str)
{
char *ret;
int n;
{
char *ret;
int n;
@@
-136,7
+132,7
@@
char *str;
if (str == NULL) return(NULL);
n=strlen(str);
if (str == NULL) return(NULL);
n=strlen(str);
- ret=
M
alloc(n+1);
+ ret=
OPENSSL_m
alloc(n+1);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);