summaryrefslogtreecommitdiffstats
path: root/rogue/hit.c
diff options
context:
space:
mode:
authortron <tron@NetBSD.org>2002-07-07 09:35:07 +0000
committertron <tron@NetBSD.org>2002-07-07 09:35:07 +0000
commitccc05ba3f3d43577640203ebe811128249f7f6e8 (patch)
treeace137b3ba5c2f75f5b419c29e5f9356f7322977 /rogue/hit.c
parentfc6e23b8f2a9e7c87ec39c79245fe61d0b4d0bb8 (diff)
downloadbsdgames-darwin-ccc05ba3f3d43577640203ebe811128249f7f6e8.tar.gz
bsdgames-darwin-ccc05ba3f3d43577640203ebe811128249f7f6e8.zip
Make "rogue" build with "WARNS=2". The necessary patches were supplied
by David A. Holland in PR bin/17498.
Diffstat (limited to 'rogue/hit.c')
-rw-r--r--rogue/hit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rogue/hit.c b/rogue/hit.c
index 5ad19e66..a0c69f90 100644
--- a/rogue/hit.c
+++ b/rogue/hit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $ */
+/* $NetBSD: hit.c,v 1.6 2002/07/07 09:35:07 tron Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)hit.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $");
+__RCSID("$NetBSD: hit.c,v 1.6 2002/07/07 09:35:07 tron Exp $");
#endif
#endif /* not lint */
@@ -213,17 +213,17 @@ get_w_damage(obj)
const object *obj;
{
char new_damage[12];
- int to_hit, damage;
+ int tmp_to_hit, tmp_damage;
int i = 0;
if ((!obj) || (obj->what_is != WEAPON)) {
return(-1);
}
- to_hit = get_number(obj->damage) + obj->hit_enchant;
+ tmp_to_hit = get_number(obj->damage) + obj->hit_enchant;
while (obj->damage[i++] != 'd') ;
- damage = get_number(obj->damage + i) + obj->d_enchant;
+ tmp_damage = get_number(obj->damage + i) + obj->d_enchant;
- sprintf(new_damage, "%dd%d", to_hit, damage);
+ sprintf(new_damage, "%dd%d", tmp_to_hit, tmp_damage);
return(get_damage(new_damage, 1));
}