svn commit: samba r5167 - in trunk/source: nsswitch passdb

jra at samba.org jra at samba.org
Wed Feb 2 01:59:06 GMT 2005


Author: jra
Date: 2005-02-02 01:59:03 +0000 (Wed, 02 Feb 2005)
New Revision: 5167

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

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

Modified:
   trunk/source/nsswitch/winbindd.c
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: trunk/source/nsswitch/winbindd.c
===================================================================
--- trunk/source/nsswitch/winbindd.c	2005-02-02 01:58:18 UTC (rev 5166)
+++ trunk/source/nsswitch/winbindd.c	2005-02-02 01:59:03 UTC (rev 5167)
@@ -487,7 +487,7 @@
 void request_finished_cont(void *private)
 {
 	struct winbindd_cli_state *state = private;
-	return request_finished(state);
+	request_finished(state);
 }
 
 static void request_recv(void *private, BOOL success)

Modified: trunk/source/passdb/pdb_ldap.c
===================================================================
--- trunk/source/passdb/pdb_ldap.c	2005-02-02 01:58:18 UTC (rev 5166)
+++ trunk/source/passdb/pdb_ldap.c	2005-02-02 01:59:03 UTC (rev 5167)
@@ -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