Clean up more unreadable assignments within if conditionals

This commit is contained in:
Markus Armbruster 2009-03-23 22:43:52 +01:00
parent 6459cfce7b
commit a2ed975ec2
19 changed files with 92 additions and 81 deletions

View file

@ -60,8 +60,8 @@ setres(void)
if (!snxtsct(&nstr, player->argp[2]))
return RET_SYN;
while (nxtsct(&nstr, &sect) > 0) {
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
(*p == '\0'))
p = getstarg(player->argp[3], "What value : ", buf);
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
if (amt > 100)
@ -79,8 +79,8 @@ setres(void)
if (!snxtsct(&nstr, player->argp[2]))
return RET_SYN;
while (nxtsct(&nstr, &sect) > 0) {
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
(*p == '\0'))
p = getstarg(player->argp[3], "What value : ", buf);
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
if (amt > 100)
@ -98,8 +98,8 @@ setres(void)
if (!snxtsct(&nstr, player->argp[2]))
return RET_SYN;
while (nxtsct(&nstr, &sect) > 0) {
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
(*p == '\0'))
p = getstarg(player->argp[3], "What value : ", buf);
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
if (amt > 100)
@ -116,8 +116,8 @@ setres(void)
if (!snxtsct(&nstr, player->argp[2]))
return RET_SYN;
while (nxtsct(&nstr, &sect) > 0) {
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
(*p == '\0'))
p = getstarg(player->argp[3], "What value : ", buf);
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
if (amt > 100)
@ -135,8 +135,8 @@ setres(void)
if (!snxtsct(&nstr, player->argp[2]))
return RET_SYN;
while (nxtsct(&nstr, &sect) > 0) {
if (!(p = getstarg(player->argp[3], "What value : ", buf)) ||
(*p == '\0'))
p = getstarg(player->argp[3], "What value : ", buf);
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
if (amt > 100)