summaryrefslogtreecommitdiff
path: root/Objects/call.c
diff options
context:
space:
mode:
authorEric Lippert <eric@lippert.com>2018-10-22 08:52:46 -0700
committerƁukasz Langa <lukasz@langa.pl>2018-10-22 16:52:46 +0100
commit5a95ba29da7e55fe6a8777b6ea4c68f60cf0e407 (patch)
tree51e246406df188ece6d7de1aee7a6e7f4e02f2c4 /Objects/call.c
parent2447773573e74819e163f8963ab107bc5db123e5 (diff)
downloadcpython-git-5a95ba29da7e55fe6a8777b6ea4c68f60cf0e407.tar.gz
Fix issue 34551 - remove redundant store (#9009)
The assignment of i/2 to nk is redundant because on this code path, nk is already the size of the dictionary, and i is already twice the size of the dictionary. I've replaced the store with an assertion that i/2 is nk.
Diffstat (limited to 'Objects/call.c')
-rw-r--r--Objects/call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/call.c b/Objects/call.c
index 1937a8b227..bda0573875 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -352,7 +352,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs
Py_INCREF(k[i+1]);
i += 2;
}
- nk = i / 2;
+ assert(i / 2 == nk);
}
else {
kwtuple = NULL;