]> granicus.if.org Git - python/commitdiff
When PyInt_FromLong() returns NULL, you do not need to check
authorFred Drake <fdrake@acm.org>
Fri, 22 Sep 2000 15:21:31 +0000 (15:21 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 22 Sep 2000 15:21:31 +0000 (15:21 +0000)
PyErr_Occurred().  Removed the extra test and setting of a
bogus exception.

Modules/pyexpat.c

index 95a098098dcecc34bdea7e969ce47554ac5235f1..ce66e5a1ed5b088655d0e94c3b1a5117f43be54e 100644 (file)
@@ -414,11 +414,9 @@ readinst(char *buf, int buf_size, PyObject *meth)
     PyObject *str = NULL;
     int len = -1;
 
-    if ((bytes = PyInt_FromLong(buf_size)) == NULL) {
-        if (!PyErr_Occurred())
-            PyErr_SetNone(PyExc_EOFError);
+    if ((bytes = PyInt_FromLong(buf_size)) == NULL)
         goto finally;
-    }
+
     if ((arg = PyTuple_New(1)) == NULL)
         goto finally;