-/* $NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $ */
+/* $NetBSD: hack.do_name.c,v 1.13 2011/08/07 06:03:45 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#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.13 2011/08/07 06:03:45 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
{
char buf[BUFSZ];
coord cc;
- int cx, cy, lth;
+ int cx, cy;
+ size_t lth;
unsigned i;
struct monst *mtmp, *mtmp2;
cc = getpos(0, "the monster you want to name");
do_oname(struct obj *obj)
{
struct obj *otmp, *otmp2;
- int lth;
+ size_t lth;
char buf[BUFSZ];
pline("What do you want to name %s? ", doname(obj));
getlin(buf);
#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
(void) strlcpy(buf, shkname(mtmp), sizeof(buf));
break;
}
- /* fall into next case */
+ /* FALLTHROUGH */
default:
(void) snprintf(buf, sizeof(buf), "the %s%s",
mtmp->minvis ? "invisible " : "",