summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-08-12 01:51:12 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-08-12 01:51:12 (GMT)
commit9cd3c34b6aaf189bd47849d0b0511234845940aa (patch)
treeec8eb3c5cd4a79d26aeb56a8355790012080d76c
parente0a81afb10f06e688093e28d5e8f42993cef9020 (diff)
downloadcpython-9cd3c34b6aaf189bd47849d0b0511234845940aa.zip
cpython-9cd3c34b6aaf189bd47849d0b0511234845940aa.tar.gz
cpython-9cd3c34b6aaf189bd47849d0b0511234845940aa.tar.bz2
Move the assert which checks for a NULL pointer first.
Klocwork #274.
-rw-r--r--Modules/collectionsmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c
index 01a7ad0..aef5d71 100644
--- a/Modules/collectionsmodule.c
+++ b/Modules/collectionsmodule.c
@@ -224,9 +224,9 @@ deque_popleft(dequeobject *deque, PyObject *unused)
deque->leftindex = CENTER + 1;
deque->rightindex = CENTER;
} else {
+ assert(deque->leftblock != NULL);
assert(deque->leftblock != deque->rightblock);
prevblock = deque->leftblock->rightlink;
- assert(deque->leftblock != NULL);
PyMem_Free(deque->leftblock);
assert(prevblock != NULL);
prevblock->leftlink = NULL;