summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-09 16:08:59 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-09 16:08:59 (GMT)
commit14e6d0954736a4d7231d1004847a7467c8464c36 (patch)
treef408a0b5ef19fbb4cebeab918437e5eac6f37dcd /Objects
parentb110dad9ab296dbc18ea4c5737add1dc978237ca (diff)
downloadcpython-14e6d0954736a4d7231d1004847a7467c8464c36.zip
cpython-14e6d0954736a4d7231d1004847a7467c8464c36.tar.gz
cpython-14e6d0954736a4d7231d1004847a7467c8464c36.tar.bz2
Remove useless variable initialization
Don't initialize variables which are not used before they are assigned.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index d3b9ec0..8892e3e 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2614,8 +2614,7 @@ PyObject *
PyObject_CallMethod(PyObject *obj, const char *name, const char *format, ...)
{
va_list va;
- PyObject *callable = NULL;
- PyObject *retval = NULL;
+ PyObject *callable, *retval;
if (obj == NULL || name == NULL) {
return null_error();
@@ -2638,8 +2637,7 @@ _PyObject_CallMethodId(PyObject *obj, _Py_Identifier *name,
const char *format, ...)
{
va_list va;
- PyObject *callable = NULL;
- PyObject *retval = NULL;
+ PyObject *callable, *retval;
if (obj == NULL || name == NULL) {
return null_error();
@@ -2662,8 +2660,7 @@ _PyObject_CallMethod_SizeT(PyObject *obj, const char *name,
const char *format, ...)
{
va_list va;
- PyObject *callable = NULL;
- PyObject *retval;
+ PyObject *callable, *retval;
if (obj == NULL || name == NULL) {
return null_error();
@@ -2686,8 +2683,7 @@ _PyObject_CallMethodId_SizeT(PyObject *obj, _Py_Identifier *name,
const char *format, ...)
{
va_list va;
- PyObject *callable = NULL;
- PyObject *retval;
+ PyObject *callable, *retval;
if (obj == NULL || name == NULL) {
return null_error();
@@ -3112,7 +3108,8 @@ PyObject *
PyObject_GetIter(PyObject *o)
{
PyTypeObject *t = o->ob_type;
- getiterfunc f = NULL;
+ getiterfunc f;
+
f = t->tp_iter;
if (f == NULL) {
if (PySequence_Check(o))