]> granicus.if.org Git - python/commitdiff
Remove local dead code. In both blocks dir is always greater 0.
authorChristian Heimes <christian@python.org>
Sat, 18 Apr 2015 03:54:02 +0000 (05:54 +0200)
committerChristian Heimes <christian@python.org>
Sat, 18 Apr 2015 03:54:02 +0000 (05:54 +0200)
Objects/bytearrayobject.c
Objects/bytesobject.c

index f055269b40a14bc752d2b8649f8c3c3e882a4bf2..d76f15f3acbd7c861442553947a9658cf35fd49c 100644 (file)
@@ -1171,10 +1171,9 @@ bytearray_find_internal(PyByteArrayObject *self, PyObject *args, int dir)
     /* Issue #23573: FIXME, windows has no memrchr() */
     else if (sub_len == 1 && dir > 0) {
         unsigned char needle = *sub;
-        int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
         res = stringlib_fastsearch_memchr_1char(
             PyByteArray_AS_STRING(self) + start, end - start,
-            needle, needle, mode);
+            needle, needle, FAST_SEARCH);
         if (res >= 0)
             res += start;
     }
index 258db63d6b0997ef2e77af671cfe26a96927fc5c..d981e0ee69859fbbcf6db5178cf15c6d0ef4d2c4 100644 (file)
@@ -1806,10 +1806,9 @@ bytes_find_internal(PyBytesObject *self, PyObject *args, int dir)
     /* Issue #23573: FIXME, windows has no memrchr() */
     else if (sub_len == 1 && dir > 0) {
         unsigned char needle = *sub;
-        int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
         res = stringlib_fastsearch_memchr_1char(
             PyBytes_AS_STRING(self) + start, end - start,
-            needle, needle, mode);
+            needle, needle, FAST_SEARCH);
         if (res >= 0)
             res += start;
     }