]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
cleanup
authorLuke Howard <lukeh@padl.com>
Thu, 1 Oct 2009 22:27:51 +0000 (22:27 +0000)
committerLuke Howard <lukeh@padl.com>
Thu, 1 Oct 2009 22:27:51 +0000 (22:27 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22823 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/authdata.c

index 3762ba70570acec36b109c52a412c8512a366a95..a2ec6b205506590e09a9f68ce40f4e99e6a01e5f 100644 (file)
@@ -31,6 +31,8 @@
 
 /* Loosely based on preauth2.c */
 
+#define IS_PRIMARY_INSTANCE(_module) ((_module)->client_req_init != NULL)
+
 static const char *objdirs[] = {
 #if TARGET_OS_MAC
     KRB5_AUTHDATA_PLUGIN_BUNDLE_DIR,
@@ -165,7 +167,7 @@ k5_ad_size(krb5_context kcontext,
             continue;
 
         /* externalize request context for the first instance only */
-        if (module->client_req_init == NULL)
+        if (!IS_PRIMARY_INSTANCE(module))
             continue;
 
         if (module->ftable->size == NULL)
@@ -222,7 +224,7 @@ k5_ad_externalize(krb5_context kcontext,
             continue;
 
         /* externalize request context for the first instance only */
-        if (module->client_req_init == NULL)
+        if (!IS_PRIMARY_INSTANCE(module))
             continue;
 
         if (module->ftable->externalize == NULL)
@@ -285,7 +287,7 @@ k5_ad_find_module(krb5_context kcontext,
             continue;
 
         /* internalize request context for the first instance only */
-        if (module->client_req_init == NULL)
+        if (!IS_PRIMARY_INSTANCE(module))
             continue;
 
         /* check for name match */
@@ -1011,7 +1013,7 @@ k5_copy_ad_module_data(krb5_context kcontext,
         return ENOENT;
 
     /* copy request context for the first instance only */
-    if (dst_module->client_req_init == NULL)
+    if (!IS_PRIMARY_INSTANCE(dst_module))
         return 0;
 
     assert(strcmp(dst_module->name, src_module->name) == 0);