summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2015-04-18 03:54:02 (GMT)
committerChristian Heimes <christian@python.org>2015-04-18 03:54:02 (GMT)
commit4e25913f9fa6c5f67c4591459a8eed2db4178367 (patch)
treef09346a8c4c8e61abf218fe41e92aefb87598fc9
parent6359641bcdf9855b941492888869b1156b62a622 (diff)
downloadcpython-4e25913f9fa6c5f67c4591459a8eed2db4178367.zip
cpython-4e25913f9fa6c5f67c4591459a8eed2db4178367.tar.gz
cpython-4e25913f9fa6c5f67c4591459a8eed2db4178367.tar.bz2
Remove local dead code. In both blocks dir is always greater 0.
-rw-r--r--Objects/bytearrayobject.c3
-rw-r--r--Objects/bytesobject.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index f055269..d76f15f 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -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;
}
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 258db63..d981e0e 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -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;
}