]> git.pond.sub.org Git - empserver/commitdiff
Drop potentially misleading build and radar error messages
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Apr 2011 13:36:21 +0000 (15:36 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 14 Apr 2011 18:21:22 +0000 (20:21 +0200)
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().

src/lib/commands/buil.c
src/lib/commands/rada.c

index 5170710cc52e11ea5c71b010ebfb8c20745f1aa7..be3ded13e955be61eaa8c435ce7de704f1a43214 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *      Steve McClure, 1998-2000
- *      Markus Armbruster, 2004-2009
+ *      Markus Armbruster, 2004-2011
  */
 
 #include <config.h>
@@ -92,10 +92,8 @@ buil(void)
        return RET_SYN;
     what = *p;
 
-    if (!snxtsct(&nstr, player->argp[2])) {
-       pr("Bad sector specification.\n");
+    if (!snxtsct(&nstr, player->argp[2]))
        return RET_SYN;
-    }
     tlev = (int)natp->nat_level[NAT_TLEV];
     rlev = (int)natp->nat_level[NAT_RLEV];
 
index 63f384eebd4d1170f715980371e0d66fe93e214f..be0552cad9d50fa54735f2b2c0d8cc1ae485de8e 100644 (file)
@@ -86,10 +86,8 @@ radar(int type)
     case NS_LIST:
     case NS_GROUP:
        /* assumes a NS_LIST return is a unit no */
-       if (!snxtitem(&ni, type, cp, NULL)) {
-           pr("Specify at least one %s\n", ef_nameof(type));
+       if (!snxtitem(&ni, type, cp, NULL))
            return RET_SYN;
-       }
        while (nxtitem(&ni, &item)) {
            if (!player->owner)
                continue;