From 95372d2149fb660d49930ba5510d189ef4f159e1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 30 Aug 2001 01:11:52 +0000 Subject: [PATCH] * kdc5_hammer.c (main): Initialize enctype at entry; eliminate enctypedone variable git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13690 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/hammer/ChangeLog | 5 +++++ src/tests/hammer/kdc5_hammer.c | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/hammer/ChangeLog b/src/tests/hammer/ChangeLog index 9e0c77dae..d5f83cc7f 100644 --- a/src/tests/hammer/ChangeLog +++ b/src/tests/hammer/ChangeLog @@ -1,3 +1,8 @@ +2001-08-29 Ken Raeburn + + * kdc5_hammer.c (main): Initialize enctype at entry; eliminate + enctypedone variable. + 2000-07-28 Ezra Peisach * kdc5_hammer.c: Move global (to file) enctype into main to prevent diff --git a/src/tests/hammer/kdc5_hammer.c b/src/tests/hammer/kdc5_hammer.c index ce415762d..fa14fd912 100644 --- a/src/tests/hammer/kdc5_hammer.c +++ b/src/tests/hammer/kdc5_hammer.c @@ -116,13 +116,13 @@ main(argc, argv) int errflg = 0; krb5_error_code code; int num_to_check, n, i, j, repeat_count, counter; - int n_tried, errors, enctypedone; + int n_tried, errors; char prefix[BUFSIZ], client[4096], server[4096]; int depth; char ctmp[4096], ctmp2[BUFSIZ], stmp[4096], stmp2[BUFSIZ]; krb5_principal client_princ; krb5_error_code retval; - krb5_enctype enctype; + krb5_enctype enctype = DEFAULT_KDC_ENCTYPE; krb5_init_context(&test_context); @@ -137,7 +137,6 @@ main(argc, argv) brief = 0; n_tried = 0; errors = 0; - enctypedone = 0; while ((option = getopt(argc, argv, "D:p:n:c:R:k:P:e:bvr:t")) != -1) { switch (option) { @@ -168,7 +167,6 @@ main(argc, argv) break; case 'k': enctype = atoi(optarg); - enctypedone++; break; case 'P': patypedata[0] = atoi(optarg); @@ -197,9 +195,6 @@ main(argc, argv) if (!(num_to_check && prefix[0])) usage(prog, 1); - if (!enctypedone) - enctype = DEFAULT_KDC_ENCTYPE; - if (!cur_realm) { if ((retval = krb5_get_default_realm(test_context, &cur_realm))) { com_err(prog, retval, "while retrieving default realm name"); -- 2.26.2