cryptui: Avoid idempotent operation (Clang)

Frédéric Delanoy frederic.delanoy at gmail.com
Sun Oct 2 12:09:48 CDT 2011


indexLow is always 0 at that point
---
 dlls/cryptui/main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 9df9800..c7caa4a 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -1969,8 +1969,7 @@ static struct OIDToString *findSupportedOID(LPCSTR oid)
     int indexHigh = sizeof(oidMap) / sizeof(oidMap[0]) - 1, indexLow = 0, i;
     struct OIDToString *ret = NULL;
 
-    for (i = (indexLow + indexHigh) / 2; !ret && indexLow <= indexHigh;
-     i = (indexLow + indexHigh) / 2)
+    for (i = indexHigh / 2; !ret && indexLow <= indexHigh; i = (indexLow + indexHigh) / 2)
     {
         int cmp;
 
-- 
1.7.6.3




More information about the wine-patches mailing list