]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Backport r51255 | neal.norwitz]
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 17:06:59 +0000 (17:06 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 17:06:59 +0000 (17:06 +0000)
Really address the issue of where to place the assert for leftblock.
(Followup of Klocwork 274)

Modules/collectionsmodule.c

index 1cceb4f58787d0d80c33a41db66bd6ff1c089588..4457551bb0a9ea2bd70cb67e86e17ebaa6402764 100644 (file)
@@ -211,6 +211,7 @@ deque_popleft(dequeobject *deque, PyObject *unused)
                PyErr_SetString(PyExc_IndexError, "pop from an empty deque");
                return NULL;
        }
+       assert(deque->leftblock != NULL);
        item = deque->leftblock->data[deque->leftindex];
        deque->leftindex++;
        deque->len--;