Commit 5eb2753a authored by Alexandre Julliard's avatar Alexandre Julliard

wldap32: Use ~0u instead of ~0ul for DWORD values.

parent fffcd23c
......@@ -58,7 +58,7 @@ ULONG CDECL ldap_addA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *attrs[] )
TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -127,7 +127,7 @@ ULONG CDECL ldap_addW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[] )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......
......@@ -53,7 +53,7 @@ ULONG CDECL ldap_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR cred, ULONG method )
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -104,7 +104,7 @@ ULONG CDECL ldap_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method )
TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (method != LDAP_AUTH_SIMPLE) return WLDAP32_LDAP_PARAM_ERROR;
if (dn) {
......@@ -124,7 +124,7 @@ ULONG CDECL ldap_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......@@ -476,7 +476,7 @@ ULONG CDECL ldap_simple_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR passwd )
TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -526,7 +526,7 @@ ULONG CDECL ldap_simple_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd )
TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......@@ -545,7 +545,7 @@ ULONG CDECL ldap_simple_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......
......@@ -49,12 +49,12 @@ ULONG CDECL ldap_compareA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value )
#ifdef HAVE_LDAP
WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
ret = ~0UL;
ret = ~0u;
TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr),
debugstr_a(value) );
if (!ld || !attr) return ~0UL;
if (!ld || !attr) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -103,12 +103,12 @@ ULONG CDECL ldap_compareW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR valu
struct berval val = { 0, NULL };
int msg;
ret = ~0UL;
ret = ~0u;
TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr),
debugstr_w(value) );
if (!ld || !attr) return ~0UL;
if (!ld || !attr) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......@@ -131,7 +131,7 @@ ULONG CDECL ldap_compareW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR valu
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......
......@@ -215,7 +215,7 @@ INT CDECL ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
if (!ld || !control) return ~0UL;
if (!ld || !control) return ~0u;
ret = ldap_create_vlv_controlW( ld, info, critical, &controlW );
......@@ -261,7 +261,7 @@ INT CDECL ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
if (!ld || !control) return ~0UL;
if (!ld || !control) return ~0u;
ret = map_error( ldap_create_vlv_control( ld, (LDAPVLVInfo *)info, &controlU ));
......
......@@ -51,7 +51,7 @@ ULONG CDECL ldap_deleteA( WLDAP32_LDAP *ld, PCHAR dn )
TRACE( "(%p, %s)\n", ld, debugstr_a(dn) );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -92,7 +92,7 @@ ULONG CDECL ldap_deleteW( WLDAP32_LDAP *ld, PWCHAR dn )
TRACE( "(%p, %s)\n", ld, debugstr_w(dn) );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......@@ -104,7 +104,7 @@ ULONG CDECL ldap_deleteW( WLDAP32_LDAP *ld, PWCHAR dn )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
strfreeU( dnU );
......
......@@ -161,14 +161,14 @@ ULONG CDECL WLDAP32_ldap_result2error( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *re
TRACE( "(%p, %p, 0x%08x)\n", ld, res, free );
if (!ld || !res) return ~0UL;
if (!ld || !res) return ~0u;
ret = ldap_parse_result( ld, res, &error, NULL, NULL, NULL, NULL, free );
if (ret == LDAP_SUCCESS)
ret = error;
else
ret = ~0UL;
ret = ~0u;
#endif
return ret;
......
......@@ -584,7 +584,7 @@ ULONG CDECL ldap_start_tls_sA( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMess
TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (serverctrls) {
serverctrlsW = controlarrayAtoW( serverctrls );
......@@ -635,7 +635,7 @@ ULONG CDECL ldap_start_tls_sW( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMess
TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (serverctrls) {
serverctrlsU = controlarrayWtoU( serverctrls );
......
......@@ -59,7 +59,7 @@ ULONG CDECL WLDAP32_ldap_abandon( WLDAP32_LDAP *ld, ULONG msgid )
TRACE( "(%p, 0x%08x)\n", ld, msgid );
if (!ld) return ~0UL;
if (!ld) return ~0u;
ret = map_error( ldap_abandon_ext( ld, msgid, NULL, NULL ));
#endif
......@@ -153,7 +153,7 @@ WLDAP32_LDAP * CDECL ldap_conn_from_msg( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *
*
* RETURNS
* Success: The number of entries.
* Failure: ~0UL
* Failure: ~0u
*/
ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *res )
{
......@@ -162,7 +162,7 @@ ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *r
TRACE( "(%p, %p)\n", ld, res );
if (!ld) return ~0UL;
if (!ld) return ~0u;
ret = ldap_count_entries( ld, res );
#endif
......@@ -180,7 +180,7 @@ ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *r
*
* RETURNS
* Success: The number of references.
* Failure: ~0UL
* Failure: ~0u
*/
ULONG CDECL WLDAP32_ldap_count_references( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *res )
{
......@@ -596,7 +596,7 @@ WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_reference( WLDAP32_LDAP *ld, WLDAP
* LDAP_RES_SEARCH_ENTRY
* LDAP_RES_SEARCH_RESULT
*
* Failure: ~0UL
* Failure: ~0u
*
* This function returns 0 when the timeout has expired.
*
......@@ -614,7 +614,7 @@ ULONG CDECL WLDAP32_ldap_result( WLDAP32_LDAP *ld, ULONG msgid, ULONG all,
TRACE( "(%p, 0x%08x, 0x%08x, %p, %p)\n", ld, msgid, all, timeout, res );
if (!ld || !res || msgid == ~0UL) return ~0UL;
if (!ld || !res || msgid == ~0u) return ~0u;
ret = ldap_result( ld, msgid, all, (struct timeval *)timeout, res );
#endif
......
......@@ -58,7 +58,7 @@ ULONG CDECL ldap_modifyA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *mods[] )
TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -128,7 +128,7 @@ ULONG CDECL ldap_modifyW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[] )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......@@ -157,7 +157,7 @@ ULONG CDECL ldap_modify_extA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *mods[],
TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), mods,
serverctrls, clientctrls, message );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -226,7 +226,7 @@ ULONG CDECL ldap_modify_extW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[],
TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), mods,
serverctrls, clientctrls, message );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......
......@@ -53,7 +53,7 @@ ULONG CDECL ldap_modrdnA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR newdn )
TRACE( "(%p, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(newdn) );
if (!ld || !newdn) return ~0UL;
if (!ld || !newdn) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -103,7 +103,7 @@ ULONG CDECL ldap_modrdnW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn )
TRACE( "(%p, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(newdn) );
if (!ld || !newdn) return ~0UL;
if (!ld || !newdn) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......@@ -118,7 +118,7 @@ ULONG CDECL ldap_modrdnW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn )
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......@@ -143,7 +143,7 @@ ULONG CDECL ldap_modrdn2A( WLDAP32_LDAP *ld, PCHAR dn, PCHAR newdn, INT delete )
TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete );
if (!ld || !newdn) return ~0UL;
if (!ld || !newdn) return ~0u;
if (dn) {
dnW = strAtoW( dn );
......@@ -194,7 +194,7 @@ ULONG CDECL ldap_modrdn2W( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete
TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete );
if (!ld || !newdn) return ~0UL;
if (!ld || !newdn) return ~0u;
if (dn) {
dnU = strWtoU( dn );
......@@ -209,7 +209,7 @@ ULONG CDECL ldap_modrdn2W( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( dnU );
......
......@@ -168,7 +168,7 @@ ULONG CDECL ldap_get_next_page( WLDAP32_LDAP *ld, PLDAPSearch search, ULONG page
{
FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message );
if (!ld) return ~0UL;
if (!ld) return ~0u;
return WLDAP32_LDAP_NOT_SUPPORTED;
}
......@@ -179,7 +179,7 @@ ULONG CDECL ldap_get_next_page_s( WLDAP32_LDAP *ld, PLDAPSearch search,
FIXME( "(%p, %p, %p, 0x%08x, %p, %p)\n", ld, search, timeout,
pagesize, count, results );
if (!ld) return ~0UL;
if (!ld) return ~0u;
return WLDAP32_LDAP_NOT_SUPPORTED;
}
......@@ -269,7 +269,7 @@ ULONG CDECL ldap_search_abandon_page( WLDAP32_LDAP *ld, PLDAPSearch search )
{
FIXME( "(%p, %p)\n", ld, search );
if (!ld) return ~0UL;
if (!ld) return ~0u;
return WLDAP32_LDAP_SUCCESS;
}
......
......@@ -125,7 +125,7 @@ ULONG CDECL ldap_parse_referenceA( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *messag
TRACE( "(%p, %p, %p)\n", ld, message, referrals );
if (!ld) return ~0UL;
if (!ld) return ~0u;
ret = ldap_parse_referenceW( ld, message, &referralsW );
......@@ -162,7 +162,7 @@ ULONG CDECL ldap_parse_referenceW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *messag
TRACE( "(%p, %p, %p)\n", ld, message, referrals );
if (!ld) return ~0UL;
if (!ld) return ~0u;
ret = map_error( ldap_parse_reference( ld, message, &referralsU, NULL, 0 ));
......@@ -383,7 +383,7 @@ INT CDECL ldap_parse_vlv_controlA( WLDAP32_LDAP *ld, PLDAPControlA *control,
TRACE( "(%p, %p, %p, %p, %p, %p)\n", ld, control, targetpos,
listcount, context, errcode );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (control) {
controlW = controlarrayAtoW( control );
......@@ -437,7 +437,7 @@ INT CDECL ldap_parse_vlv_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control,
TRACE( "(%p, %p, %p, %p, %p, %p)\n", ld, control, targetpos,
listcount, context, errcode );
if (!ld || !control) return ~0UL;
if (!ld || !control) return ~0u;
controlU = controlarrayWtoU( control );
if (!controlU) return WLDAP32_LDAP_NO_MEMORY;
......
......@@ -55,7 +55,7 @@ ULONG CDECL ldap_searchA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, PCHAR filte
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_a(base),
scope, debugstr_a(filter), attrs, attrsonly );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (base) {
baseW = strAtoW( base );
......@@ -97,7 +97,7 @@ exit:
*
* RETURNS
* Success: Message ID of the search operation.
* Failure: ~0UL
* Failure: ~0u
*
* NOTES
* Call ldap_result with the message ID to get the result of
......@@ -117,7 +117,7 @@ ULONG CDECL ldap_searchW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR fil
TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_w(base),
scope, debugstr_w(filter), attrs, attrsonly );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (base) {
baseU = strWtoU( base );
......@@ -138,7 +138,7 @@ ULONG CDECL ldap_searchW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR fil
if (ret == LDAP_SUCCESS)
ret = msg;
else
ret = ~0UL;
ret = ~0u;
exit:
strfreeU( baseU );
......@@ -251,7 +251,7 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope,
ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly,
serverctrls, clientctrls, timelimit, sizelimit, message );
if (!ld) return ~0UL;
if (!ld) return ~0u;
if (base) {
baseU = strWtoU( base );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment