[PATCH] [SAMBA3] remove minor C99-isms

James Peach jpeach at sgi.com
Wed Feb 2 01:20:04 GMT 2005


Hi,

The attached patch removes a couple of minor C99-ims that have crept in.
This restores builtability to IRIX folks using the MIPSPro 7.3
compilers.

cheers,

-- 
James Peach | jpeach at sgi.com | SGI Australian Software Group
I don't speak for SGI.
-------------- next part --------------
Index: source/nsswitch/winbindd.c
===================================================================
--- source/nsswitch/winbindd.c	(revision 5165)
+++ source/nsswitch/winbindd.c	(working copy)
@@ -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)
Index: source/passdb/pdb_ldap.c
===================================================================
--- source/passdb/pdb_ldap.c	(revision 5165)
+++ source/passdb/pdb_ldap.c	(working copy)
@@ -2896,12 +2896,13 @@
 	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), 
-		NULL 
+	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 +3010,13 @@
 	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), 
-		NULL 
+	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-technical mailing list