diff options
author | Raymond Hettinger <python@rcn.com> | 2015-09-22 01:20:36 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-09-22 01:20:36 -0700 |
commit | 7a237230d1a98a369de7e3c6581a42d31465430a (patch) | |
tree | 360ac4e96ffb9a8adf8a003affbf10adf172135a | |
parent | d3d2b2c50c8e85e1d3f9429964e080d0ea5f8634 (diff) | |
download | cpython-git-7a237230d1a98a369de7e3c6581a42d31465430a.tar.gz |
Eliminate unnecessary variable
-rw-r--r-- | Modules/_collectionsmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 7dbf7555d4..4eb31bf9c5 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -804,10 +804,9 @@ deque_reverse(dequeobject *deque, PyObject *unused) Py_ssize_t leftindex = deque->leftindex; Py_ssize_t rightindex = deque->rightindex; Py_ssize_t n = Py_SIZE(deque) >> 1; - Py_ssize_t i; PyObject *tmp; - for (i=0 ; i<n ; i++) { + while (n-- > 0) { /* Validate that pointers haven't met in the middle */ assert(leftblock != rightblock || leftindex < rightindex); CHECK_NOT_END(leftblock); |