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.o_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hack/hack.o_init.c') diff --git a/hack/hack.o_init.c b/hack/hack.o_init.c index 7b38ab16..6db5a45b 100644 --- a/hack/hack.o_init.c +++ b/hack/hack.o_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.o_init.c,v 1.11 2011/08/06 20:00:33 dholland Exp $ */ +/* $NetBSD: hack.o_init.c,v 1.12 2011/08/06 20:18:26 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.o_init.c,v 1.11 2011/08/06 20:00:33 dholland Exp $"); +__RCSID("$NetBSD: hack.o_init.c,v 1.12 2011/08/06 20:18:26 dholland Exp $"); #endif /* not lint */ #include @@ -206,7 +206,7 @@ restnames(int fd) for (i = 0; i < SIZE(objects); i++) if (objects[i].oc_uname) { mread(fd, &len, sizeof len); - objects[i].oc_uname = (char *) alloc(len); + objects[i].oc_uname = alloc(len); mread(fd, objects[i].oc_uname, len); } } -- cgit v1.2.3