rename optind to optidx, move variable define to avoid shadowing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15430 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -113,7 +113,7 @@ generate_commands(void)
|
||||
{
|
||||
char *base;
|
||||
char *cfn;
|
||||
char *p;
|
||||
char *p, *q;
|
||||
|
||||
p = strrchr(table_name, '/');
|
||||
if(p == NULL)
|
||||
@@ -145,7 +145,6 @@ generate_commands(void)
|
||||
|
||||
{
|
||||
struct command_list *cl, *xl;
|
||||
char *p, *q;
|
||||
|
||||
for(cl = commands; cl; cl = cl->next) {
|
||||
for(xl = commands; xl != cl; xl = xl->next)
|
||||
@@ -211,10 +210,10 @@ usage(int code)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int optind = 0;
|
||||
int optidx = 0;
|
||||
|
||||
setprogname(argv[0]);
|
||||
if(getarg(args, num_args, argc, argv, &optind))
|
||||
if(getarg(args, num_args, argc, argv, &optidx))
|
||||
usage(1);
|
||||
if(help_flag)
|
||||
usage(0);
|
||||
@@ -223,9 +222,9 @@ main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if(argc == optind)
|
||||
if(argc == optidx)
|
||||
usage(1);
|
||||
filename = argv[optind];
|
||||
filename = argv[optidx];
|
||||
yyin = fopen(filename, "r");
|
||||
if(yyin == NULL)
|
||||
err(1, "%s", filename);
|
||||
|
Reference in New Issue
Block a user