diff options
author | Brett Cannon <bcannon@gmail.com> | 2010-05-04 01:16:51 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2010-05-04 01:16:51 (GMT) |
commit | a7f13ee3f5c9468abf6ce09b9a74d8a1b2782512 (patch) | |
tree | af43b4231f025c6ee4b0a8618b7296c5bfcf3132 /Objects | |
parent | 945df9a388ef5d31105e743de83dbd1382e31ec5 (diff) | |
download | cpython-a7f13ee3f5c9468abf6ce09b9a74d8a1b2782512.zip cpython-a7f13ee3f5c9468abf6ce09b9a74d8a1b2782512.tar.gz cpython-a7f13ee3f5c9468abf6ce09b9a74d8a1b2782512.tar.bz2 |
Remove an unneeded variable and assignment.
Found using Clang's static analyzer.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index aab33b5..7c7e062 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4346,7 +4346,7 @@ PyUnicode_BuildEncodingMap(PyObject* string) if (!result) return NULL; for (i = 0; i < 256; i++) { - key = value = NULL; + value = NULL; key = PyInt_FromLong(decode[i]); value = PyInt_FromLong(i); if (!key || !value) @@ -5846,7 +5846,7 @@ PyObject *replace(PyUnicodeObject *self, } } else { - Py_ssize_t n, i, j, e; + Py_ssize_t n, i, j; Py_ssize_t product, new_size, delta; Py_UNICODE *p; @@ -5878,7 +5878,6 @@ PyObject *replace(PyUnicodeObject *self, return NULL; i = 0; p = u->str; - e = self->length - str1->length; if (str1->length > 0) { while (n-- > 0) { /* look for next match */ |