summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-02-02 01:58:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:31 -0500
commiteed0e6875b3a4708a9c7cfa8bbddf207b85ca396 (patch)
tree6d988cfb7852a5adec85aea276f65d640cbc5e9c /source3
parentc1b9243c2892220b906df86d7b021d1bf18571b6 (diff)
downloadsamba-eed0e6875b3a4708a9c7cfa8bbddf207b85ca396.tar.gz
samba-eed0e6875b3a4708a9c7cfa8bbddf207b85ca396.tar.bz2
samba-eed0e6875b3a4708a9c7cfa8bbddf207b85ca396.zip
r5166: From James Peach - remove minor C99-isms.
Jeremy. (This used to be commit 54ac409d4fd3b6e8e2bd338dabed446a92507811)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ldap.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 0d680db2be..6fdf80074c 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2896,12 +2896,15 @@ static NTSTATUS ldapsam_get_account_policy(struct pdb_methods *methods, int poli
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 @@ static NTSTATUS ldapsam_set_account_policy(struct pdb_methods *methods, int poli
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"));