From 9454bf2a02784b7f28fbab922d3d8b56b2193786 Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 6 Aug 2011 20:18:26 +0000 Subject: Use the right type for the malloc wrapper function, and don't cast the return value. (XXX: Except for a pile of allocation macros that produce typed pointer results; there the typechecking of the result assignment is more valuable than the warning if the alloc function isn't declared properly. These macros should go away.) --- hack/hack.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hack/hack.h') diff --git a/hack/hack.h b/hack/hack.h index 827b855e..575b00ef 100644 --- a/hack/hack.h +++ b/hack/hack.h @@ -1,4 +1,4 @@ -/* $NetBSD: hack.h,v 1.15 2011/08/06 19:47:54 dholland Exp $ */ +/* $NetBSD: hack.h,v 1.16 2011/08/06 20:18:26 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -91,7 +91,7 @@ typedef struct { #include "def.rm.h" #include "def.permonst.h" -#define newstring(x) (char *) alloc((unsigned)(x)) +#define newstring(x) ((char *) alloc(x)) #include "hack.onames.h" #define ON 1 -- cgit v1.2.3