svn commit: samba r5166 - in branches/SAMBA_3_0/source/passdb: .

jra at samba.org jra at samba.org
Wed Feb 2 01:58:19 GMT 2005


Author: jra
Date: 2005-02-02 01:58:18 +0000 (Wed, 02 Feb 2005)
New Revision: 5166

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5166

Log:
>From James Peach - remove minor C99-isms.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-02-01 20:43:14 UTC (rev 5165)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-02-02 01:58:18 UTC (rev 5166)
@@ -2896,12 +2896,15 @@
 	struct ldapsam_privates *ldap_state =
 		(struct ldapsam_privates *)methods->private_data;
 
-	char *attrs[] = {
-		(char *)get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_NAME), 
-		(char *)get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_VAL), 
+	const char *attrs[] = {
+		NULL,
+		NULL,
 		NULL 
 	};
 
+	attrs[0] = get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_NAME);
+	attrs[1] = get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_VAL);
+
 	if (cache_account_policy_get(policy_index, value)) {
 		DEBUG(11,("ldapsam_get_account_policy: got valid value from cache\n"));
 		return NT_STATUS_OK;
@@ -3009,12 +3012,15 @@
 	struct ldapsam_privates *ldap_state =
 		(struct ldapsam_privates *)methods->private_data;
 
-	char *attrs[] = {
-		(char *)get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_NAME), 
-		(char *)get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_VAL), 
+	const char *attrs[] = {
+		NULL,
+		NULL,
 		NULL 
 	};
 
+	attrs[0] = get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_NAME), 
+	attrs[1] = get_attr_key2string(acctpol_attr_list, LDAP_ATTR_ACCOUNT_POLICY_VAL), 
+
 	policy_string = decode_account_policy_name(policy_index);
 	if (!policy_string) {
 		DEBUG(0,("ldapsam_set_account_policy: invalid policy\n"));



More information about the samba-cvs mailing list