From 8ed9644253809a7df1b4dd40afb1bedb9beaa89d Mon Sep 17 00:00:00 2001 From: Marc Olzheim Date: Tue, 23 Mar 2004 16:02:41 +0000 Subject: [PATCH] Don't shadow existing variables. No functional changes. --- src/lib/player/player.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/player/player.c b/src/lib/player/player.c index 50217a9e..03ab445a 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -307,12 +307,12 @@ int execute(void) { s_char buf[512]; - int abort; + int failed; s_char *p; s_char *redir; s_char scanspace[1024]; - abort = 0; + failed = 0; redir = 0; p = getstarg(player->argp[1], "File? ", buf); @@ -321,24 +321,24 @@ execute(void) return RET_SYN; prexec(player->argp[1]); - while (!abort && status()) { + while (!failed && status()) { if (recvclient(buf, sizeof(buf)) < 0) break; if (parse(buf, player->argp, &player->condarg, scanspace, &redir) < 0) { - abort = 1; + failed = 1; continue; } if (redir == 0) pr("\nExecute : %s\n", buf); if (dispatch(buf, redir) < 0) - abort = 1; + failed = 1; } - if (abort) { + if (failed) { while (recvclient(buf, sizeof(buf)) >= 0) ; } if (redir == 0) - pr("Execute : %s\n", abort ? "aborted" : "terminated"); + pr("Execute : %s\n", failed ? "aborted" : "terminated"); return RET_OK; } @@ -374,7 +374,7 @@ show_motd(void) } int -match_user(char *file, struct player *player) +match_user(char *file, struct player *p) { FILE *fp; int match = 0; @@ -395,9 +395,9 @@ match_user(char *file, struct player *player) break; host[strlen(host) - 1] = '\0'; user[strlen(user) - 1] = '\0'; - if (strstr(player->userid, user) && - (strstr(player->hostaddr, host) || - strstr(player->hostname, host))) + if (strstr(p->userid, user) && + (strstr(p->hostaddr, host) || + strstr(p->hostname, host))) ++match; } fclose(fp); @@ -412,8 +412,8 @@ quit(void) } s_char * -praddr(struct player *player) +praddr(struct player *p) { - return prbuf("%s@%s", player->userid, - *player->hostname ? player->hostname : player->hostaddr); + return prbuf("%s@%s", p->userid, + *p->hostname ? p->hostname : p->hostaddr); }