Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14e6d09

Browse files
committed
Remove useless variable initialization
Don't initialize variables which are not used before they are assigned.
1 parent b110dad commit 14e6d09

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

Objects/abstract.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,8 +2614,7 @@ PyObject *
26142614
PyObject_CallMethod(PyObject *obj, const char *name, const char *format, ...)
26152615
{
26162616
va_list va;
2617-
PyObject *callable = NULL;
2618-
PyObject *retval = NULL;
2617+
PyObject *callable, *retval;
26192618

26202619
if (obj == NULL || name == NULL) {
26212620
return null_error();
@@ -2638,8 +2637,7 @@ _PyObject_CallMethodId(PyObject *obj, _Py_Identifier *name,
26382637
const char *format, ...)
26392638
{
26402639
va_list va;
2641-
PyObject *callable = NULL;
2642-
PyObject *retval = NULL;
2640+
PyObject *callable, *retval;
26432641

26442642
if (obj == NULL || name == NULL) {
26452643
return null_error();
@@ -2662,8 +2660,7 @@ _PyObject_CallMethod_SizeT(PyObject *obj, const char *name,
26622660
const char *format, ...)
26632661
{
26642662
va_list va;
2665-
PyObject *callable = NULL;
2666-
PyObject *retval;
2663+
PyObject *callable, *retval;
26672664

26682665
if (obj == NULL || name == NULL) {
26692666
return null_error();
@@ -2686,8 +2683,7 @@ _PyObject_CallMethodId_SizeT(PyObject *obj, _Py_Identifier *name,
26862683
const char *format, ...)
26872684
{
26882685
va_list va;
2689-
PyObject *callable = NULL;
2690-
PyObject *retval;
2686+
PyObject *callable, *retval;
26912687

26922688
if (obj == NULL || name == NULL) {
26932689
return null_error();
@@ -3112,7 +3108,8 @@ PyObject *
31123108
PyObject_GetIter(PyObject *o)
31133109
{
31143110
PyTypeObject *t = o->ob_type;
3115-
getiterfunc f = NULL;
3111+
getiterfunc f;
3112+
31163113
f = t->tp_iter;
31173114
if (f == NULL) {
31183115
if (PySequence_Check(o))

0 commit comments

Comments
 (0)