summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:53:14 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:53:14 (GMT)
commitc09efa844419b801ba9d9db9e04ccfb2af59d7f3 (patch)
tree7f02cf0b0881db5b8c7bbf5382d4319594bbeacd /Objects
parentf71847e6459c4103189b705fd654cf1485d11b2a (diff)
downloadcpython-c09efa844419b801ba9d9db9e04ccfb2af59d7f3.zip
cpython-c09efa844419b801ba9d9db9e04ccfb2af59d7f3.tar.gz
cpython-c09efa844419b801ba9d9db9e04ccfb2af59d7f3.tar.bz2
Move the initialization of size_a down below the check for a being NULL.
Reported by Klocwork #106
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index cbd6f2b..4ce9479 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1203,7 +1203,7 @@ long_format(PyObject *aa, int base, int addL)
register PyLongObject *a = (PyLongObject *)aa;
PyStringObject *str;
Py_ssize_t i;
- const Py_ssize_t size_a = ABS(a->ob_size);
+ Py_ssize_t size_a;
char *p;
int bits;
char sign = '\0';
@@ -1213,6 +1213,7 @@ long_format(PyObject *aa, int base, int addL)
return NULL;
}
assert(base >= 2 && base <= 36);
+ size_a = ABS(a->ob_size);
/* Compute a rough upper bound for the length of the string */
i = base;