]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix indentation and add curlies (closes #27093)
authorBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2016 05:47:50 +0000 (22:47 -0700)
committerBenjamin Peterson <benjamin@python.org>
Tue, 24 May 2016 05:47:50 +0000 (22:47 -0700)
Modules/cjkcodecs/cjkcodecs.h

index 399e9dca4051089761308aed7fae0418c30bcd30..ac2892dc1bbac80bd22f8e9b498afacd15f8622e 100644 (file)
@@ -325,22 +325,26 @@ find_pairencmap(ucs2_t body, ucs2_t modifier,
     min = 0;
     max = haystacksize;
 
-    for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1)
+    for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) {
         if (value < haystack[pos].uniseq) {
-            if (max == pos) break;
-            else max = pos;
+            if (max != pos) {
+                max = pos;
+                continue;
+            }
         }
         else if (value > haystack[pos].uniseq) {
-            if (min == pos) break;
-            else min = pos;
+            if (min != pos) {
+                min = pos;
+                continue;
+            }
         }
-        else
-            break;
+        break;
+    }
 
-        if (value == haystack[pos].uniseq)
-            return haystack[pos].code;
-        else
-            return DBCINV;
+    if (value == haystack[pos].uniseq) {
+        return haystack[pos].code;
+    }
+    return DBCINV;
 }
 #endif