From debf3801221eefb5f8e85a8b04624fd19c185d35 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 9 Oct 2007 15:52:07 +0000 Subject: [PATCH 1/1] size_t-fy crypto/buffer. --- crypto/buffer/buffer.c | 8 ++++---- crypto/buffer/buffer.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c index a7fe5ba54f..620ea8d536 100644 --- a/crypto/buffer/buffer.c +++ b/crypto/buffer/buffer.c @@ -89,10 +89,10 @@ void BUF_MEM_free(BUF_MEM *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; - unsigned int n; + size_t n; if (str->length >= len) { @@ -125,10 +125,10 @@ int BUF_MEM_grow(BUF_MEM *str, int 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; - unsigned int n; + size_t n; if (str->length >= len) { diff --git a/crypto/buffer/buffer.h b/crypto/buffer/buffer.h index f7acca56ed..178e418282 100644 --- a/crypto/buffer/buffer.h +++ b/crypto/buffer/buffer.h @@ -76,15 +76,15 @@ extern "C" { struct buf_mem_st { - int length; /* current number of bytes */ + size_t length; /* current number of bytes */ char *data; - int max; /* size of buffer */ + size_t max; /* size of buffer */ }; BUF_MEM *BUF_MEM_new(void); void BUF_MEM_free(BUF_MEM *a); -int BUF_MEM_grow(BUF_MEM *str, int len); -int BUF_MEM_grow_clean(BUF_MEM *str, int len); +int BUF_MEM_grow(BUF_MEM *str, size_t len); +int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); char * BUF_strdup(const char *str); char * BUF_strndup(const char *str, size_t siz); void * BUF_memdup(const void *data, size_t siz); -- 2.34.1