(zdon): Simplify. Also gets rid of a compiler warning.

This commit is contained in:
Markus Armbruster 2007-07-10 17:28:23 +00:00
parent 32f20dc511
commit bd16520e7c

View file

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