[PATCH] wldap32: Remove unnecessary test of sortkey.

Huw Davies huw at codeweavers.com
Fri Apr 16 05:43:42 CDT 2021


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/wldap32/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wldap32/control.c b/dlls/wldap32/control.c
index 42098fc814a..b012648797c 100644
--- a/dlls/wldap32/control.c
+++ b/dlls/wldap32/control.c
@@ -152,7 +152,7 @@ ULONG CDECL ldap_create_sort_controlW( WLDAP32_LDAP *ld, LDAPSortKeyW **sortkey,
 
     if (!ld || !sortkey || !control) return WLDAP32_LDAP_PARAM_ERROR;
 
-    if (sortkey && !(sortkeyU = sortkeyarrayWtoU( sortkey ))) return WLDAP32_LDAP_NO_MEMORY;
+    if (!(sortkeyU = sortkeyarrayWtoU( sortkey ))) return WLDAP32_LDAP_NO_MEMORY;
 
     ret = map_error( ldap_funcs->ldap_create_sort_control( ld->ld, sortkeyU, critical, &controlU ) );
     if (ret == WLDAP32_LDAP_SUCCESS)
-- 
2.23.0




More information about the wine-devel mailing list