diff options
author | dholland <dholland@NetBSD.org> | 2011-01-05 15:52:20 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2011-01-05 15:52:20 +0000 |
commit | 50b74e853be3a74020a46ec883ec0b0ea1f044b5 (patch) | |
tree | c27112ea39131835da9a8a660b556c4ee1c8e7dc /hunt | |
parent | bda6d3ca90b837496d5b92de73444a9fdb75b6a8 (diff) | |
download | bsdgames-darwin-50b74e853be3a74020a46ec883ec0b0ea1f044b5.tar.gz bsdgames-darwin-50b74e853be3a74020a46ec883ec0b0ea1f044b5.tar.zst bsdgames-darwin-50b74e853be3a74020a46ec883ec0b0ea1f044b5.zip |
avoid unnecessary cast (hi wiz)
Diffstat (limited to 'hunt')
-rw-r--r-- | hunt/hunt/hunt.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <sys/cdefs.h> #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 <sys/param.h> @@ -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 && |