summaryrefslogtreecommitdiffstats
path: root/crypto/buffer
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-02-13 14:02:24 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-02-13 14:50:36 +0100
commite5bf3c923c184b19e8c3ef7043080955479a2325 (patch)
tree6df32d37a2e12177e9907cb33a350851a2821949 /crypto/buffer
parentAdd leak detection, fix leaks. (diff)
downloadopenssl-e5bf3c923c184b19e8c3ef7043080955479a2325.tar.xz
openssl-e5bf3c923c184b19e8c3ef7043080955479a2325.zip
size_t for buffer functions.
Change BUF_MEM_grow and BUF_MEM_grow_clean to return size_t. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/buffer')
-rw-r--r--crypto/buffer/buffer.c4
-rw-r--r--crypto/buffer/buffer.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index f762fe8003..0859974e79 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -94,7 +94,7 @@ void BUF_MEM_free(BUF_MEM *a)
OPENSSL_free(a);
}
-int BUF_MEM_grow(BUF_MEM *str, size_t len)
+size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
{
char *ret;
size_t n;
@@ -130,7 +130,7 @@ int BUF_MEM_grow(BUF_MEM *str, size_t len)
return (len);
}
-int BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
+size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
{
char *ret;
size_t n;
diff --git a/crypto/buffer/buffer.h b/crypto/buffer/buffer.h
index 530ffd2c51..672c06b395 100644
--- a/crypto/buffer/buffer.h
+++ b/crypto/buffer/buffer.h
@@ -82,8 +82,8 @@ struct buf_mem_st {
BUF_MEM *BUF_MEM_new(void);
void BUF_MEM_free(BUF_MEM *a);
-int BUF_MEM_grow(BUF_MEM *str, size_t len);
-int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
+size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
+size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
size_t BUF_strnlen(const char *str, size_t maxlen);
char *BUF_strdup(const char *str);
char *BUF_strndup(const char *str, size_t siz);