From 2d4837b2258d29b65fd6018b91161f617b1f9497 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 21 Jul 2000 04:37:44 +0000 Subject: [PATCH] print usage consistently git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8733 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kpasswd/kpasswd.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kpasswd/kpasswd.c b/kpasswd/kpasswd.c index 85553f394..053e19ee5 100644 --- a/kpasswd/kpasswd.c +++ b/kpasswd/kpasswd.c @@ -43,12 +43,9 @@ static struct getargs args[] = { }; static void -usage (int ret) +usage (int ret, struct getargs *a, int num_args) { - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[principal]"); + arg_printusage (a, num_args, NULL, "[principal]"); exit (ret); } @@ -66,10 +63,10 @@ main (int argc, char **argv) char pwbuf[BUFSIZ]; optind = krb5_program_setup(&context, argc, argv, - args, sizeof(args) / sizeof(args[0]), NULL); + args, sizeof(args) / sizeof(args[0]), usage); if (help_flag) - usage (0); + usage (0, args, sizeof(args) / sizeof(args[0])); if(version_flag){ print_version (NULL); @@ -86,7 +83,7 @@ main (int argc, char **argv) argv += optind; if (argc > 1) - usage(1); + usage (1, args, sizeof(args) / sizeof(args[0])); ret = krb5_init_context (&context); if (ret)