Module Name: src Committed By: dholland Date: Wed Jan 5 15:52:20 UTC 2011
Modified Files: src/games/hunt/hunt: hunt.c Log Message: avoid unnecessary cast (hi wiz) To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/games/hunt/hunt/hunt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/games/hunt/hunt/hunt.c diff -u src/games/hunt/hunt/hunt.c:1.37 src/games/hunt/hunt/hunt.c:1.38 --- src/games/hunt/hunt/hunt.c:1.37 Wed Jan 5 15:40:55 2011 +++ src/games/hunt/hunt/hunt.c Wed Jan 5 15:52:20 2011 @@ -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 @@ 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 &&