diff options
author | Luke Leighton <lkcl@samba.org> | 1999-10-25 19:03:27 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-10-25 19:03:27 +0000 |
commit | 56128244261f8e4c6e1144da66c736fbc2104665 (patch) | |
tree | 232c98fb3cd975522fa341af724bf1d05b16cae1 /source3/lib/membuffer.c | |
parent | fdf6383cbec457e3e38b50bcc801661767fa4c0d (diff) | |
download | samba-56128244261f8e4c6e1144da66c736fbc2104665.tar.gz samba-56128244261f8e4c6e1144da66c736fbc2104665.tar.bz2 samba-56128244261f8e4c6e1144da66c736fbc2104665.zip |
- typecast malloc / Realloc issues.
- signed / unsigned issues.
(This used to be commit c8fd555179314baf1672a23db34dc8ad9f2d02bf)
Diffstat (limited to 'source3/lib/membuffer.c')
-rw-r--r-- | source3/lib/membuffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/membuffer.c b/source3/lib/membuffer.c index 92bc2be439..170433074f 100644 --- a/source3/lib/membuffer.c +++ b/source3/lib/membuffer.c @@ -107,7 +107,7 @@ BOOL mem_alloc_data(struct mem_buf *buf, int size) buf->data_size = size + buf->margin; buf->data_used = size; - buf->data = malloc(buf->data_size); + buf->data = (char*)malloc(buf->data_size); if (buf->data == NULL && size != 0) { @@ -176,7 +176,7 @@ BOOL mem_buf_init(struct mem_buf **buf, uint32 margin) if ((*buf) == NULL) { - (*buf) = malloc(sizeof(**buf)); + (*buf) = (struct mem_buf*)malloc(sizeof(**buf)); if ((*buf) != NULL) { mem_init((*buf), margin); @@ -236,7 +236,7 @@ void mem_free_data(struct mem_buf *buf) /******************************************************************* reallocate a memory buffer, including a safety margin ********************************************************************/ -BOOL mem_realloc_data(struct mem_buf *buf, int new_size) +BOOL mem_realloc_data(struct mem_buf *buf, size_t new_size) { char *new_data; @@ -252,7 +252,7 @@ BOOL mem_realloc_data(struct mem_buf *buf, int new_size) return True; } - new_data = Realloc(buf->data, new_size + buf->margin); + new_data = (char*)Realloc(buf->data, new_size + buf->margin); if (new_data != NULL) { |