From 50b74e853be3a74020a46ec883ec0b0ea1f044b5 Mon Sep 17 00:00:00 2001 From: dholland Date: Wed, 5 Jan 2011 15:52:20 +0000 Subject: avoid unnecessary cast (hi wiz) --- hunt/hunt/hunt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hunt') diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 2d1747b4..b6b7d5e0 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.37 2011/01/05 15:40:55 wiz Exp $ */ +/* $NetBSD: hunt.c,v 1.38 2011/01/05 15:52:20 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.37 2011/01/05 15:40:55 wiz Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.38 2011/01/05 15:52:20 dholland Exp $"); #endif /* not lint */ #include @@ -468,12 +468,13 @@ get_response: set[0].events = POLLIN; for (;;) { if (listc + 1 >= listmax) { - void *newlistv; + SOCKET *newlistv; + listmax += 20; - newlistv = realloc(listv, listmax * sizeof(SOCKET)); + newlistv = realloc(listv, listmax * sizeof(*listv)); if (newlistv == NULL) leave(1, "realloc"); - listv = (SOCKET *)newlistv; + listv = newlistv; } if (poll(set, 1, 1000) == 1 && -- cgit v1.2.3-56-ge451