Drop potentially misleading build and radar error messages

buil() complains about the argument when snxtsct() fails.  Misleading
when the argument is fine, but snxtsct() fails due to bad conditional
argument.

Same for radar() with snxtitem().
This commit is contained in:
Markus Armbruster 2011-04-09 15:36:21 +02:00
parent 4dfb84086a
commit 2f86e79e80
2 changed files with 3 additions and 7 deletions

View file

@ -28,7 +28,7 @@
* *
* Known contributors to this file: * Known contributors to this file:
* Steve McClure, 1998-2000 * Steve McClure, 1998-2000
* Markus Armbruster, 2004-2009 * Markus Armbruster, 2004-2011
*/ */
#include <config.h> #include <config.h>
@ -92,10 +92,8 @@ buil(void)
return RET_SYN; return RET_SYN;
what = *p; what = *p;
if (!snxtsct(&nstr, player->argp[2])) { if (!snxtsct(&nstr, player->argp[2]))
pr("Bad sector specification.\n");
return RET_SYN; return RET_SYN;
}
tlev = (int)natp->nat_level[NAT_TLEV]; tlev = (int)natp->nat_level[NAT_TLEV];
rlev = (int)natp->nat_level[NAT_RLEV]; rlev = (int)natp->nat_level[NAT_RLEV];

View file

@ -86,10 +86,8 @@ radar(int type)
case NS_LIST: case NS_LIST:
case NS_GROUP: case NS_GROUP:
/* assumes a NS_LIST return is a unit no */ /* assumes a NS_LIST return is a unit no */
if (!snxtitem(&ni, type, cp, NULL)) { if (!snxtitem(&ni, type, cp, NULL))
pr("Specify at least one %s\n", ef_nameof(type));
return RET_SYN; return RET_SYN;
}
while (nxtitem(&ni, &item)) { while (nxtitem(&ni, &item)) {
if (!player->owner) if (!player->owner)
continue; continue;