Commit da6c3ee5 authored by Fred Drake's avatar Fred Drake

When PyInt_FromLong() returns NULL, you do not need to check

PyErr_Occurred().  Removed the extra test and setting of a
bogus exception.
parent cbb1558b
...@@ -414,11 +414,9 @@ readinst(char *buf, int buf_size, PyObject *meth) ...@@ -414,11 +414,9 @@ readinst(char *buf, int buf_size, PyObject *meth)
PyObject *str = NULL; PyObject *str = NULL;
int len = -1; int len = -1;
if ((bytes = PyInt_FromLong(buf_size)) == NULL) { if ((bytes = PyInt_FromLong(buf_size)) == NULL)
if (!PyErr_Occurred())
PyErr_SetNone(PyExc_EOFError);
goto finally; goto finally;
}
if ((arg = PyTuple_New(1)) == NULL) if ((arg = PyTuple_New(1)) == NULL)
goto finally; goto finally;
......
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