Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/hunt/hunt avoid unnecessary cast (hi wiz)
details: https://anonhg.NetBSD.org/src/rev/b39cd38752ff
branches: trunk
changeset: 760460:b39cd38752ff
user: dholland <dholland%NetBSD.org@localhost>
date: Wed Jan 05 15:52:20 2011 +0000
description:
avoid unnecessary cast (hi wiz)
diffstat:
games/hunt/hunt/hunt.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 947454a090a5 -r b39cd38752ff games/hunt/hunt/hunt.c
--- a/games/hunt/hunt/hunt.c Wed Jan 05 15:48:00 2011 +0000
+++ b/games/hunt/hunt/hunt.c Wed Jan 05 15:52:20 2011 +0000
@@ -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 &&
Home |
Main Index |
Thread Index |
Old Index