]> git.pond.sub.org Git - empserver/commitdiff
(zdon): Simplify. Also gets rid of a compiler warning.
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Jul 2007 17:28:23 +0000 (17:28 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Jul 2007 17:28:23 +0000 (17:28 +0000)
src/lib/commands/zdon.c

index 9738a84954258b8b7c83cc7e468163d664a148e2..c6ac37f4ee46f3d3645ebc32315cde36c7fc35ea 100644 (file)
@@ -89,18 +89,15 @@ zdon(void)
     if (player->aborted)
        return RET_FAIL;
 
-    if (!p) {
-       /* Default response is checking only */
-       checking = 1;
-    } else {
-       checking = 0;
-       if (*p == 'n' || *p == 'N') {
-           wantupd = 0;
-       } else if (*p == 'y' || *p == 'Y') {
+    checking = 1;
+    wantupd = 0;
+    if (p) {
+       if (*p == 'y' || *p == 'Y') {
+           checking = 0;
            wantupd = 1;
-       } else {
-           /* Default response is checking only */
-           checking = 1;
+       } else if  (*p == 'n' || *p == 'N') {
+           checking = 0;
+           wantupd = 0;
        }
     }