From 7d6ebe0de7d99c20854cafb8af50fe8f30ed778a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 16:19:49 -0700 Subject: More const fixes. Remove CONST_DISCARD. --- source3/lib/smbldap.c | 4 ++-- source3/lib/tldap_util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 002b1706b2..d7d06e9e08 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -1480,7 +1480,7 @@ static int smbldap_search_ext(struct smbldap_state *ldap_state, while (another_ldap_try(ldap_state, &rc, &attempts, endtime)) { rc = ldap_search_ext_s(ldap_state->ldap_struct, base, scope, utf8_filter, - CONST_DISCARD(char **, attrs), + discard_const_p(char *, attrs), attrsonly, sctrls, cctrls, &timeout, sizelimit, res); if (rc != LDAP_SUCCESS) { @@ -1924,7 +1924,7 @@ static bool smbldap_check_root_dse(LDAP *ld, const char **attrs, const char *val } rc = ldap_search_s(ld, "", LDAP_SCOPE_BASE, - "(objectclass=*)", CONST_DISCARD(char **, attrs), 0 , &msg); + "(objectclass=*)", discard_const_p(char *, attrs), 0 , &msg); if (rc != LDAP_SUCCESS) { DEBUG(3,("smbldap_check_root_dse: Could not search rootDSE\n")); diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c index 0c22d6564e..e4cb5f040b 100644 --- a/source3/lib/tldap_util.c +++ b/source3/lib/tldap_util.c @@ -325,7 +325,7 @@ bool tldap_make_mod_fmt(struct tldap_message *existing, TALLOC_CTX *mem_ctx, blob.length = strlen(newval); if (blob.length != 0) { - blob.data = CONST_DISCARD(uint8_t *, newval); + blob.data = discard_const_p(uint8_t, newval); } ret = tldap_make_mod_blob_int(existing, mem_ctx, pmods, pnum_mods, attrib, blob, compare_utf8_blobs); -- cgit