rename optind to optidx

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15474 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-06-17 04:48:02 +00:00
parent 4a78962ece
commit 583e4fad3e
3 changed files with 13 additions and 13 deletions

View File

@@ -102,12 +102,12 @@ main(int argc, char **argv)
krb5_context context; krb5_context context;
krb5_error_code ret; krb5_error_code ret;
krb5_realm realm; krb5_realm realm;
int optind = 0; int optidx = 0;
char *user; char *user;
setprogname(argv[0]); setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)) if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage(1); usage(1);
if (help_flag) if (help_flag)
@@ -118,8 +118,8 @@ main(int argc, char **argv)
exit(0); exit(0);
} }
argc -= optind; argc -= optidx;
argv += optind; argv += optidx;
if (argc != 1) if (argc != 1)
errx(1, "first argument should be a local user that in root .k5login"); errx(1, "first argument should be a local user that in root .k5login");

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003 Kungliga Tekniska H<>gskolan * Copyright (c) 2003-2005 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -115,7 +115,7 @@ main(int argc, char **argv)
krb5_context context; krb5_context context;
krb5_error_code ret; krb5_error_code ret;
int i, iterations; int i, iterations;
int optind = 0; int optidx = 0;
krb5_enctype enctypes[] = { krb5_enctype enctypes[] = {
ETYPE_DES_CBC_CRC, ETYPE_DES_CBC_CRC,
@@ -127,7 +127,7 @@ main(int argc, char **argv)
setprogname(argv[0]); setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)) if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage(1); usage(1);
if (help_flag) if (help_flag)
@@ -138,8 +138,8 @@ main(int argc, char **argv)
exit(0); exit(0);
} }
argc -= optind; argc -= optidx;
argv += optind; argv += optidx;
ret = krb5_init_context(&context); ret = krb5_init_context(&context);

View File

@@ -77,11 +77,11 @@ main(int argc, char **argv)
krb5_context context; krb5_context context;
krb5_error_code ret; krb5_error_code ret;
krb5_addresses addrs; krb5_addresses addrs;
int optind = 0; int optidx = 0;
setprogname (argv[0]); setprogname (argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)) if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage(1); usage(1);
if (help_flag) if (help_flag)
@@ -92,8 +92,8 @@ main(int argc, char **argv)
exit(0); exit(0);
} }
argc -= optind; argc -= optidx;
argv += optind; argv += optidx;
ret = krb5_init_context(&context); ret = krb5_init_context(&context);
if (ret) if (ret)