size_t-fy crypto/buffer.
authorAndy Polyakov <appro@openssl.org>
Tue, 9 Oct 2007 15:52:07 +0000 (15:52 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 9 Oct 2007 15:52:07 +0000 (15:52 +0000)
crypto/buffer/buffer.c
crypto/buffer/buffer.h

index a7fe5ba54f47dcdaea15f5f59b320d2c89f11e4b..620ea8d5368a678c644696c0c7f650ea9ed8c085 100644 (file)
@@ -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)
                {
index f7acca56ed770065c954b88cc86d1ed32578e19f..178e418282b2eb74ca575f61db678a393a151562 100644 (file)
@@ -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);