Fix "variable shadows global declaration" warnings.

This commit is contained in:
simonb 2003-11-12 06:45:14 +00:00
parent bb845a9d67
commit 5e217f5e82
1 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: command.c,v 1.3 1997/09/15 01:29:30 lukem Exp $ */ /* $NetBSD: command.c,v 1.4 2003/11/12 06:45:14 simonb Exp $ */
/* /*
* Copyright (c) 1994 Philip A. Nelson. * Copyright (c) 1994 Philip A. Nelson.
@ -33,7 +33,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: command.c,v 1.3 1997/09/15 01:29:30 lukem Exp $"); __RCSID("$NetBSD: command.c,v 1.4 2003/11/12 06:45:14 simonb Exp $");
#endif /* not lint */ #endif /* not lint */
/* /*
@ -153,12 +153,12 @@ parse(cmdline, args)
char *cmdline; char *cmdline;
char **args; char **args;
{ {
int index; int idx;
int argcnt = BLANK_LINE; int argcnt = BLANK_LINE;
/* Initialize the args. */ /* Initialize the args. */
for (index = 0; index < MAXARGS; index++) for (idx = 0; idx < MAXARGS; idx++)
args[index] = NULL; args[idx] = NULL;
/* Start looking for the commands */ /* Start looking for the commands */
while (*cmdline != 0) { while (*cmdline != 0) {
@ -261,7 +261,7 @@ help(num, args, syntax)
char *syntax; char *syntax;
{ {
const struct command *item; const struct command *item;
int index; int idx;
int show_cmds = FALSE; int show_cmds = FALSE;
char dummy[2]; char dummy[2];
@ -270,17 +270,17 @@ help(num, args, syntax)
/* Print help for each argument. */ /* Print help for each argument. */
if (num > 1) if (num > 1)
for (index = 1; index < num; index++) { for (idx = 1; idx < num; idx++) {
item = find_entry(args[index]); item = find_entry(args[idx]);
if (item != NULL) { if (item != NULL) {
printf("\n"); printf("\n");
if (item->syntax[0] != 0) if (item->syntax[0] != 0)
printf("Syntax: %s\n", item->syntax); printf("Syntax: %s\n", item->syntax);
printf("%s\n\n", item->help); printf("%s\n\n", item->help);
if (index < num - 1) if (idx < num - 1)
prompt(dummy, 1, "cr to continue:"); prompt(dummy, 1, "cr to continue:");
} else { } else {
printf("unknow command %s.\n", args[index]); printf("unknow command %s.\n", args[idx]);
show_cmds = TRUE; show_cmds = TRUE;
} }
} }