From f5c80119ca090a9238c68feea616f6227e0b9f65 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 4 Aug 2009 14:48:16 +0200 Subject: buffer: add two explicit casts to reduce compiler warnings in makenewline(). Michael --- src/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 853fb86..8b2d33a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -66,11 +66,11 @@ makenewline (unsigned char *data, size_t length) assert (data != NULL); assert (length > 0); - newline = safemalloc (sizeof (struct bufline_s)); + newline = (struct bufline_s *)safemalloc (sizeof (struct bufline_s)); if (!newline) return NULL; - newline->string = safemalloc (length); + newline->string = (unsigned char *)safemalloc (length); if (!newline->string) { safefree (newline); -- cgit v1.2.3