From 3b62a43ec6dbb6d5d4d9fc6a2bf496485135ec5a Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 17 Nov 1996 16:09:12 +0000 Subject: [PATCH] removed count git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1028 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/otp/otp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/appl/otp/otp.c b/appl/otp/otp.c index f0e6c60b1..30b450cce 100644 --- a/appl/otp/otp.c +++ b/appl/otp/otp.c @@ -46,7 +46,7 @@ static void usage (void) { fprintf(stderr, - "Usage: %s [-r] [-s] [-n count] [-f alg] num seed\n", + "Usage: %s [-r] [-s] [-f alg] num seed\n", prog); exit (1); } @@ -61,7 +61,7 @@ strlwr (char *s) } static int -renew (int argc, char **argv, int count, OtpAlgorithm *alg) +renew (int argc, char **argv, OtpAlgorithm *alg) { struct passwd *pwd; OtpContext oldctx, newctx, *ctx; @@ -115,7 +115,7 @@ renew (int argc, char **argv, int count, OtpAlgorithm *alg) } static int -set (int argc, char **argv, int count, OtpAlgorithm *alg) +set (int argc, char **argv, OtpAlgorithm *alg) { void *db; OtpContext ctx; @@ -169,21 +169,17 @@ int main (int argc, char **argv) { int c; - int count = 10; int setp = 0; int renewp = 0; OtpAlgorithm *alg = otp_find_alg (OTP_ALG_DEFAULT); prog = argv[0]; - while ((c = getopt (argc, argv, "rshn:f:")) != EOF) + while ((c = getopt (argc, argv, "rshf:")) != EOF) switch (c) { case 'r' : renewp = 1; break; - case 'n' : - count = atoi (optarg); - break; case 's' : setp = 1; break; @@ -207,9 +203,9 @@ main (int argc, char **argv) argv += optind; if (setp) - return set (argc, argv, count, alg); + return set (argc, argv, alg); else if (renewp) - return renew (argc, argv, count, alg); + return renew (argc, argv, alg); else { fprintf (stderr, "%s: Nothing to do\n", prog); return 1;