dlls/ntdll/sec.c -- simplify condition (RESEND)

Gerald Pfeifer gerald at pfeifer.com
Wed Nov 21 18:07:29 CST 2007


Another patch related to -Wtype-limits.

---------- Forwarded message ----------
From: Gerald Pfeifer <gerald at pfeifer.com>
To:  <wine-patches at winehq.org>
Date: Sat, 3 Nov 2007 21:45:41 +0100 (CET)
Subject: dlls/ntdll/sec.c -- simplify condition

ChangeLog:
Simplify condition in RtlGetAce() based on variable (un)signedness.

Gerald

Index: dlls/ntdll/sec.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/sec.c,v
retrieving revision 1.90
diff -u -3 -p -r1.90 sec.c
--- dlls/ntdll/sec.c	31 Oct 2007 13:37:15 -0000	1.90
+++ dlls/ntdll/sec.c	3 Nov 2007 19:05:02 -0000
@@ -1341,7 +1341,7 @@ NTSTATUS WINAPI RtlGetAce(PACL pAcl,DWOR
 
 	TRACE("(%p,%d,%p)\n",pAcl,dwAceIndex,pAce);
 
-	if ((dwAceIndex < 0) || (dwAceIndex > pAcl->AceCount))
+	if (dwAceIndex > pAcl->AceCount)
 		return STATUS_INVALID_PARAMETER;
 
 	ace = (PACE_HEADER)(pAcl + 1);



More information about the wine-patches mailing list