Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/hack Remove more silly casts.
details: https://anonhg.NetBSD.org/src/rev/dea3cc5121aa
branches: trunk
changeset: 768035:dea3cc5121aa
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Aug 06 20:29:37 2011 +0000
description:
Remove more silly casts.
diffstat:
games/hack/hack.do.c | 6 +++---
games/hack/hack.do_name.c | 6 +++---
games/hack/hack.end.c | 6 +++---
games/hack/hack.engrave.c | 6 +++---
games/hack/hack.invent.c | 8 ++++----
games/hack/hack.lev.c | 16 ++++++++--------
games/hack/hack.mon.c | 6 +++---
games/hack/hack.pager.c | 6 +++---
games/hack/hack.read.c | 6 +++---
games/hack/hack.shk.c | 12 ++++++------
games/hack/hack.steal.c | 6 +++---
games/hack/hack.topl.c | 6 +++---
games/hack/hack.worm.c | 6 +++---
13 files changed, 48 insertions(+), 48 deletions(-)
diffs (truncated from 429 to 300 lines):
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.do.c
--- a/games/hack/hack.do.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.do.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.do.c,v 1.10 2011/07/20 07:04:30 dholland Exp $ */
+/* $NetBSD: hack.do.c,v 1.11 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.do.c,v 1.10 2011/07/20 07:04:30 dholland Exp $");
+__RCSID("$NetBSD: hack.do.c,v 1.11 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
/* Contains code for 'd', 'D' (drop), '>', '<' (up, down) and 't' (throw) */
@@ -101,7 +101,7 @@
if (Invisible)
newsym(u.ux, u.uy);
}
- free((char *) obj);
+ free(obj);
return (1);
}
if (obj->owornmask & (W_ARMOR | W_RING)) {
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.do_name.c
--- a/games/hack/hack.do_name.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.do_name.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $ */
+/* $NetBSD: hack.do_name.c,v 1.12 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $");
+__RCSID("$NetBSD: hack.do_name.c,v 1.12 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -211,7 +211,7 @@
#if 0
obfree(obj, otmp2); /* now unnecessary: no pointers on bill */
#endif
- free((char *) obj); /* let us hope nobody else saved a pointer */
+ free(obj); /* let us hope nobody else saved a pointer */
}
int
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.end.c
--- a/games/hack/hack.end.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.end.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.end.c,v 1.15 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.end.c,v 1.16 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.end.c,v 1.15 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.end.c,v 1.16 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <signal.h>
@@ -804,7 +804,7 @@
break;
}
}
- free((char *) t1);
+ free(t1);
}
#ifdef nonsense
totchars[totcharct] = 0;
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.engrave.c
--- a/games/hack/hack.engrave.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.engrave.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.engrave.c,v 1.11 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.engrave.c,v 1.12 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.engrave.c,v 1.11 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.engrave.c,v 1.12 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -392,5 +392,5 @@
return;
fnd: ;
}
- free((char *) ep);
+ free(ep);
}
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.invent.c
--- a/games/hack/hack.invent.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.invent.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.invent.c,v 1.15 2011/05/23 22:53:25 joerg Exp $ */
+/* $NetBSD: hack.invent.c,v 1.16 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.invent.c,v 1.15 2011/05/23 22:53:25 joerg Exp $");
+__RCSID("$NetBSD: hack.invent.c,v 1.16 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <assert.h>
@@ -237,7 +237,7 @@
}
gtmp->ngold = gold->ngold;
}
- free((char *) gold);
+ free(gold);
}
void
@@ -251,7 +251,7 @@
for (ttmp = ftrap; ttmp->ntrap != trap; ttmp = ttmp->ntrap);
ttmp->ntrap = trap->ntrap;
}
- free((char *) trap);
+ free(trap);
}
struct wseg *m_atseg;
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.lev.c
--- a/games/hack/hack.lev.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.lev.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.lev.c,v 1.12 2011/08/06 20:00:33 dholland Exp $ */
+/* $NetBSD: hack.lev.c,v 1.13 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.lev.c,v 1.12 2011/08/06 20:00:33 dholland Exp $");
+__RCSID("$NetBSD: hack.lev.c,v 1.13 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -150,7 +150,7 @@
xl = otmp->onamelth;
bwrite(fd, (char *) &xl, sizeof(int));
bwrite(fd, (char *) otmp, xl + sizeof(struct obj));
- free((char *) otmp);
+ free(otmp);
otmp = otmp2;
}
bwrite(fd, (char *) &minusone, sizeof(int));
@@ -173,7 +173,7 @@
bwrite(fd, (char *) mtmp, xl + sizeof(struct monst));
if (mtmp->minvent)
saveobjchn(fd, mtmp->minvent);
- free((char *) mtmp);
+ free(mtmp);
mtmp = mtmp2;
}
bwrite(fd, (char *) &minusone, sizeof(int));
@@ -186,7 +186,7 @@
while (gold) {
gold2 = gold->ngold;
bwrite(fd, (char *) gold, sizeof(struct gold));
- free((char *) gold);
+ free(gold);
gold = gold2;
}
bwrite(fd, nul, sizeof(struct gold));
@@ -199,7 +199,7 @@
while (trap) {
trap2 = trap->ntrap;
bwrite(fd, (char *) trap, sizeof(struct trap));
- free((char *) trap);
+ free(trap);
trap = trap2;
}
bwrite(fd, nul, sizeof(struct trap));
@@ -273,7 +273,7 @@
gold = newgold();
mread(fd, gold, sizeof(struct gold));
}
- free((char *) gold);
+ free(gold);
trap = newtrap();
mread(fd, trap, sizeof(struct trap));
while (trap->tx) {
@@ -282,7 +282,7 @@
trap = newtrap();
mread(fd, trap, sizeof(struct trap));
}
- free((char *) trap);
+ free(trap);
fobj = restobjchn(fd);
billobjs = restobjchn(fd);
rest_engravings(fd);
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.mon.c
--- a/games/hack/hack.mon.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.mon.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.mon.c,v 1.12 2011/08/06 20:24:35 dholland Exp $ */
+/* $NetBSD: hack.mon.c,v 1.13 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.mon.c,v 1.12 2011/08/06 20:24:35 dholland Exp $");
+__RCSID("$NetBSD: hack.mon.c,v 1.13 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -765,7 +765,7 @@
struct monst *mtmp;
while ((mtmp = fdmon) != NULL) {
fdmon = mtmp->nmon;
- free((char *) mtmp);
+ free(mtmp);
}
}
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.pager.c
--- a/games/hack/hack.pager.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.pager.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.pager.c,v 1.17 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.pager.c,v 1.18 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.17 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.18 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
@@ -348,7 +348,7 @@
cleanup:
while ((tl = texthead) != NULL) {
texthead = tl->next_line;
- free((char *) tl);
+ free(tl);
}
}
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.read.c
--- a/games/hack/hack.read.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.read.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.read.c,v 1.10 2009/08/12 07:28:41 dholland Exp $ */
+/* $NetBSD: hack.read.c,v 1.11 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.read.c,v 1.10 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.read.c,v 1.11 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -203,7 +203,7 @@
Punished = 0;
freeobj(uchain);
unpobj(uchain);
- free((char *) uchain);
+ free(uchain);
uball->spe = 0;
uball->owornmask &= ~W_BALL;
uchain = uball = (struct obj *) 0;
diff -r 527a7aa4082c -r dea3cc5121aa games/hack/hack.shk.c
--- a/games/hack/hack.shk.c Sat Aug 06 20:24:35 2011 +0000
+++ b/games/hack/hack.shk.c Sat Aug 06 20:29:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.shk.c,v 1.11 2009/08/12 07:28:41 dholland Exp $ */
Home |
Main Index |
Thread Index |
Old Index