switch to getarg directly

This commit is contained in:
Love Hornquist Astrand
2009-11-23 07:36:34 -08:00
parent 960b6d9cc5
commit 7dd146072c

View File

@@ -117,22 +117,21 @@ main (int argc, char **argv)
krb5_error_code ret;
krb5_context context;
krb5_principal principal;
int optind = 0;
krb5_get_init_creds_opt *opt;
krb5_ccache id = NULL;
int exit_value;
int optidx = 0;
optind = krb5_program_setup(&context, argc, argv,
args, sizeof(args) / sizeof(args[0]), usage);
setprogname(argv[0]);
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage(1, args, sizeof(args) / sizeof(args[0]));
if (help_flag)
usage (0, args, sizeof(args) / sizeof(args[0]));
if(version_flag){
print_version (NULL);
exit(0);
usage(0, args, sizeof(args) / sizeof(args[0]));
if (version_flag) {
print_version(NULL);
return 0;
}
argc -= optind;
argv += optind;