$NetBSD: patch-ad,v 1.2 2007/10/15 15:37:01 jlam Exp $

--- authldaplib.c.orig	Sat Jan 20 17:03:22 2007
+++ authldaplib.c
@@ -126,7 +126,7 @@ authldap_free_config removed - no longer
 static char **l_get_values(LDAP *ld, LDAPMessage *entry, const char *attribut)
 {
 	struct berval **p=ldap_get_values_len(ld, entry, attribut);
-	int n;
+	int i, n;
 	char **a;
 
 	if (!p)
@@ -143,8 +143,6 @@ static char **l_get_values(LDAP *ld, LDA
 		ldap_value_free_len(p);
 		return NULL;
 	}
-
-	int i;
 
 	for (i=0; i<n; i++)
 	{
