From 6aaa863432967b99d0e2c87116b4ec844b90436f Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Thu, 31 Jul 2003 23:38:28 +0000 Subject: Added appropriate casts from (void*) so that the code will compile cleanly with a C++ compiler. (Tested using GCC 3.3) --- src/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 1d48e0c..db805d1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1,4 +1,4 @@ -/* $Id: buffer.c,v 1.22 2002-05-24 04:45:32 rjkaes Exp $ +/* $Id: buffer.c,v 1.23 2003-07-31 23:38:28 rjkaes Exp $ * * The buffer used in each connection is a linked list of lines. As the lines * are read in and written out the buffer expands and contracts. Basically, @@ -60,10 +60,10 @@ makenewline(unsigned char *data, size_t length) assert(data != NULL); assert(length > 0); - if (!(newline = safemalloc(sizeof(struct bufline_s)))) + if (!(newline = (struct bufline_s*)safemalloc(sizeof(struct bufline_s)))) return NULL; - if (!(newline->string = safemalloc(length))) { + if (!(newline->string = (unsigned char*)safemalloc(length))) { safefree(newline); return NULL; } @@ -104,7 +104,7 @@ new_buffer(void) { struct buffer_s *buffptr; - if (!(buffptr = safemalloc(sizeof(struct buffer_s)))) + if (!(buffptr = (struct buffer_s*)safemalloc(sizeof(struct buffer_s)))) return NULL; /* -- cgit v1.2.3