projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f71847e
)
Move the initialization of size_a down below the check for a being NULL.
author
Neal Norwitz
<nnorwitz@gmail.com>
Sun, 23 Jul 2006 07:53:14 +0000
(07:53 +0000)
committer
Neal Norwitz
<nnorwitz@gmail.com>
Sun, 23 Jul 2006 07:53:14 +0000
(07:53 +0000)
Reported by Klocwork #106
Objects/longobject.c
patch
|
blob
|
history
diff --git
a/Objects/longobject.c
b/Objects/longobject.c
index cbd6f2be593ed713df5b91aede6e4a9263dc1cad..4ce947955a98baa57e1a7e1929d8435daec8d1ec 100644
(file)
--- 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;