rename optind to optidx

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15585 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-07 21:52:04 +00:00
parent 8297868729
commit da49dbd58e

View File

@@ -149,13 +149,13 @@ usage(int status)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int optind = 0; int optidx = 0;
krb5_error_code ret; krb5_error_code ret;
setprogname(argv[0]); setprogname(argv[0]);
ret = krb5_init_context(&context); ret = krb5_init_context(&context);
if (ret) if (ret)
errx (1, "krb5_init_context failed: %d", ret); errx (1, "krb5_init_context failed: %d", ret);
if(getarg(args, num_args, argc, argv, &optind)) if(getarg(args, num_args, argc, argv, &optidx))
usage(1); usage(1);
if(help_flag) if(help_flag)
usage(0); usage(0);
@@ -163,8 +163,8 @@ main(int argc, char **argv)
print_version(NULL); print_version(NULL);
exit(0); exit(0);
} }
argc -= optind; argc -= optidx;
argv += optind; argv += optidx;
if(argc == 0) if(argc == 0)
usage(1); usage(1);
ret = sl_command(commands, argc, argv); ret = sl_command(commands, argc, argv);