From 810a5b0fa0f3ff0179130104b526339a5a71a700 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 2 Aug 2005 14:42:10 +0000 Subject: [PATCH] Use WLDAP32_LDAP_NO_MEMORY instead of LDAP_NO_MEMORY. --- dlls/wldap32/bind.c | 36 ++++++++++++++++++++++++------------ dlls/wldap32/compare.c | 6 ++++++ dlls/wldap32/init.c | 6 ++++-- dlls/wldap32/search.c | 29 +++++++++++++++++++---------- 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/dlls/wldap32/bind.c b/dlls/wldap32/bind.c index 26913e55728..65cd70d565f 100644 --- a/dlls/wldap32/bind.c +++ b/dlls/wldap32/bind.c @@ -46,7 +46,8 @@ ULONG ldap_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR cred, ULONG method ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *credW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p, 0x%08lx)\n", ld, debugstr_a(dn), cred, method ); @@ -76,7 +77,8 @@ ULONG ldap_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *dnU = NULL, *credU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p, 0x%08lx)\n", ld, debugstr_w(dn), cred, method ); @@ -106,7 +108,8 @@ ULONG ldap_bind_sA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR cred, ULONG method ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *credW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p, 0x%08lx)\n", ld, debugstr_a(dn), cred, method ); @@ -136,7 +139,8 @@ ULONG ldap_bind_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *dnU = NULL, *credU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p, 0x%08lx)\n", ld, debugstr_w(dn), cred, method ); @@ -169,7 +173,8 @@ ULONG ldap_sasl_bindA( WLDAP32_LDAP *ld, const PCHAR dn, #ifdef HAVE_LDAP WCHAR *dnW, *mechanismW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), debugstr_a(mechanism), cred, serverctrls, clientctrls, message ); @@ -212,7 +217,8 @@ ULONG ldap_sasl_bindW( WLDAP32_LDAP *ld, const PWCHAR dn, #ifdef HAVE_LDAP char *dnU, *mechanismU = NULL; LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), debugstr_w(mechanism), cred, serverctrls, clientctrls, message ); @@ -256,7 +262,8 @@ ULONG ldap_sasl_bind_sA( WLDAP32_LDAP *ld, const PCHAR dn, #ifdef HAVE_LDAP WCHAR *dnW, *mechanismW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), debugstr_a(mechanism), cred, serverctrls, clientctrls, serverdata ); @@ -299,7 +306,8 @@ ULONG ldap_sasl_bind_sW( WLDAP32_LDAP *ld, const PWCHAR dn, #ifdef HAVE_LDAP char *dnU, *mechanismU = NULL; LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), debugstr_w(mechanism), cred, serverctrls, clientctrls, serverdata ); @@ -340,7 +348,8 @@ ULONG ldap_simple_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR passwd ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *passwdW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd ); @@ -370,7 +379,8 @@ ULONG ldap_simple_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *dnU = NULL, *passwdU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd ); @@ -400,7 +410,8 @@ ULONG ldap_simple_bind_sA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR passwd ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *passwdW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd ); @@ -430,7 +441,8 @@ ULONG ldap_simple_bind_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *dnU = NULL, *passwdU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd ); diff --git a/dlls/wldap32/compare.c b/dlls/wldap32/compare.c index 9428602e6c6..a6de42ee333 100644 --- a/dlls/wldap32/compare.c +++ b/dlls/wldap32/compare.c @@ -45,6 +45,7 @@ ULONG ldap_compareA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr), @@ -122,6 +123,7 @@ ULONG ldap_compare_extA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value, #ifdef HAVE_LDAP WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), @@ -230,6 +232,7 @@ ULONG ldap_compare_ext_sA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value, #ifdef HAVE_LDAP WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_a(dn), @@ -281,6 +284,7 @@ ULONG ldap_compare_ext_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR valu struct berval berval; char *dnU = NULL, *attrU = NULL, *valueU = NULL; LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_w(dn), @@ -333,6 +337,7 @@ ULONG ldap_compare_sA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr), @@ -369,6 +374,7 @@ ULONG ldap_compare_sW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value ) ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *dnU = NULL, *attrU = NULL, *valueU = NULL; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr), diff --git a/dlls/wldap32/init.c b/dlls/wldap32/init.c index f82a0117586..ec64ad6cd5c 100644 --- a/dlls/wldap32/init.c +++ b/dlls/wldap32/init.c @@ -150,7 +150,8 @@ ULONG ldap_start_tls_sA( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMessage ** ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls ); @@ -181,7 +182,8 @@ ULONG ldap_start_tls_sW( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMessage ** ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls ); diff --git a/dlls/wldap32/search.c b/dlls/wldap32/search.c index aeca06455a7..4792e8d73d0 100644 --- a/dlls/wldap32/search.c +++ b/dlls/wldap32/search.c @@ -47,7 +47,8 @@ ULONG ldap_searchA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, PCHAR filter, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly ); @@ -84,7 +85,8 @@ ULONG ldap_searchW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *baseU = NULL, *filterU = NULL, **attrsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly ); @@ -123,7 +125,8 @@ ULONG ldap_search_extA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, #ifdef HAVE_LDAP WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p, 0x%08lx, 0x%08lx, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly, @@ -177,7 +180,7 @@ ULONG ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; struct timeval tv; - ret = LDAP_NO_MEMORY; + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p, 0x%08lx, 0x%08lx, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly, @@ -231,7 +234,8 @@ ULONG ldap_search_ext_sA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, #ifdef HAVE_LDAP WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p, %p, 0x%08lx, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly, @@ -282,7 +286,8 @@ ULONG ldap_search_ext_sW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, #ifdef HAVE_LDAP char *baseU = NULL, *filterU = NULL, **attrsU = NULL; LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p, %p, 0x%08lx, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly, @@ -331,7 +336,8 @@ ULONG ldap_search_sA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, PCHAR filter, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly, res ); @@ -368,7 +374,8 @@ ULONG ldap_search_sW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR filter, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *baseU = NULL, *filterU = NULL, **attrsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly, res ); @@ -406,7 +413,8 @@ ULONG ldap_search_stA( WLDAP32_LDAP *ld, const PCHAR base, ULONG scope, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP WCHAR *baseW = NULL, *filterW = NULL, **attrsW = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, @@ -446,7 +454,8 @@ ULONG ldap_search_stW( WLDAP32_LDAP *ld, const PWCHAR base, ULONG scope, ULONG ret = LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP char *baseU = NULL, *filterU = NULL, **attrsU = NULL; - ret = LDAP_NO_MEMORY; + + ret = WLDAP32_LDAP_NO_MEMORY; TRACE( "(%p, %s, 0x%08lx, %s, %p, 0x%08lx, %p, %p)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, -- 2.11.4.GIT