changeset 63:8740373ee20e HEAD

casting fixes
author Timo Sirainen <tss@iki.fi>
date Wed, 28 Aug 2002 07:43:06 +0300
parents 4bcf3ff12c60
children 83ae914a583a
files src/lib/iobuffer.c src/lib/strfuncs.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/iobuffer.c	Wed Aug 28 07:41:25 2002 +0300
+++ b/src/lib/iobuffer.c	Wed Aug 28 07:43:06 2002 +0300
@@ -802,7 +802,7 @@
 	}
 
 	buf->cr_lookup_pos = i;
-        return (char *) ret_buf;
+        return ret_buf;
 }
 
 unsigned char *io_buffer_get_data(IOBuffer *buf, unsigned int *size)
--- a/src/lib/strfuncs.c	Wed Aug 28 07:41:25 2002 +0300
+++ b/src/lib/strfuncs.c	Wed Aug 28 07:43:06 2002 +0300
@@ -853,7 +853,9 @@
 
         i_assert(*separators != '\0');
 
-	str = (char *) t_strdup(data);
+	len = strlen(data+1);
+	str = t_malloc(len);
+	memcpy(str, data, len);
 
         alloc_len = 20;
         array = t_buffer_get(sizeof(const char *) * alloc_len);