Use krb5int_count_etypes in rd_req_decoded_opt
authorGreg Hudson <ghudson@mit.edu>
Sat, 2 Jan 2010 02:35:40 +0000 (02:35 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 2 Jan 2010 02:35:40 +0000 (02:35 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23567 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/rd_req_dec.c

index a20eb4cac7ea0f965ca7f7b7a443c6d796c9b8d4..49f07f7ed670ad717b509fac7fbf31dbb9bf06d9 100644 (file)
@@ -455,10 +455,7 @@ rd_req_decoded_opt(krb5_context context, krb5_auth_context *auth_context,
             if (retval != 0)
                 goto cleanup;
         }
-        for (permitted_etypes_len = 0;
-             permitted_etypes[permitted_etypes_len] != ENCTYPE_NULL;
-             permitted_etypes_len++)
-            ;
+        permitted_etypes_len = krb5int_count_etypes(permitted_etypes);
     } else {
         permitted_etypes = NULL;
         permitted_etypes_len = 0;