[openssl-commits] [openssl] master update
Dr. Stephen Henson
steve at openssl.org
Fri Feb 13 13:52:16 UTC 2015
The branch master has been updated
via e5bf3c923c184b19e8c3ef7043080955479a2325 (commit)
from d5ec8efc70d3f9197dd6965d959de7dcda784459 (commit)
- Log -----------------------------------------------------------------
commit e5bf3c923c184b19e8c3ef7043080955479a2325
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Fri Feb 13 13:02:24 2015 +0000
size_t for buffer functions.
Change BUF_MEM_grow and BUF_MEM_grow_clean to return size_t.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/bio/bss_mem.c | 2 +-
crypto/buffer/buffer.c | 4 ++--
crypto/buffer/buffer.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index d190765..56e0d2e 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -187,7 +187,7 @@ static int mem_write(BIO *b, const char *in, int inl)
BIO_clear_retry_flags(b);
blen = bm->length;
- if (BUF_MEM_grow_clean(bm, blen + inl) != (blen + inl))
+ if (BUF_MEM_grow_clean(bm, blen + inl) == 0)
goto end;
memcpy(&(bm->data[blen]), in, inl);
ret = inl;
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index f762fe8..0859974 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 530ffd2..672c06b 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);
More information about the openssl-commits
mailing list