size_t-fy crypto/buffer.

This commit is contained in:
Andy Polyakov 2007-10-09 15:52:07 +00:00
parent ddb038d349
commit debf380122
2 changed files with 8 additions and 8 deletions

View File

@ -89,10 +89,10 @@ void BUF_MEM_free(BUF_MEM *a)
OPENSSL_free(a); OPENSSL_free(a);
} }
int BUF_MEM_grow(BUF_MEM *str, int len) int BUF_MEM_grow(BUF_MEM *str, size_t len)
{ {
char *ret; char *ret;
unsigned int n; size_t n;
if (str->length >= len) if (str->length >= len)
{ {
@ -125,10 +125,10 @@ int BUF_MEM_grow(BUF_MEM *str, int len)
return(len); return(len);
} }
int BUF_MEM_grow_clean(BUF_MEM *str, int len) int BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
{ {
char *ret; char *ret;
unsigned int n; size_t n;
if (str->length >= len) if (str->length >= len)
{ {

View File

@ -76,15 +76,15 @@ extern "C" {
struct buf_mem_st struct buf_mem_st
{ {
int length; /* current number of bytes */ size_t length; /* current number of bytes */
char *data; char *data;
int max; /* size of buffer */ size_t max; /* size of buffer */
}; };
BUF_MEM *BUF_MEM_new(void); BUF_MEM *BUF_MEM_new(void);
void BUF_MEM_free(BUF_MEM *a); void BUF_MEM_free(BUF_MEM *a);
int BUF_MEM_grow(BUF_MEM *str, int len); int BUF_MEM_grow(BUF_MEM *str, size_t len);
int BUF_MEM_grow_clean(BUF_MEM *str, int len); int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
char * BUF_strdup(const char *str); char * BUF_strdup(const char *str);
char * BUF_strndup(const char *str, size_t siz); char * BUF_strndup(const char *str, size_t siz);
void * BUF_memdup(const void *data, size_t siz); void * BUF_memdup(const void *data, size_t siz);