Kaydet (Commit) c09efa84 authored tarafından Neal Norwitz's avatar Neal Norwitz

Move the initialization of size_a down below the check for a being NULL.

Reported by Klocwork #106
üst f71847e6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment