Commit 7ee447dc authored by Christian Heimes's avatar Christian Heimes

Remove local dead code. In both blocks dir is always greater 0.

parent 26641e57
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment