diff options
author | Fred Drake <fdrake@acm.org> | 2000-09-22 15:21:31 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-09-22 15:21:31 (GMT) |
commit | 676940b49742309dd8914edc9ed276cfd38aa557 (patch) | |
tree | 6feb7ef505f013a938ece36ac7a34453efbd9ff9 /Modules/pyexpat.c | |
parent | d35509a82d8fc1cb41ac9f10755f359e60a339a4 (diff) | |
download | cpython-676940b49742309dd8914edc9ed276cfd38aa557.zip cpython-676940b49742309dd8914edc9ed276cfd38aa557.tar.gz cpython-676940b49742309dd8914edc9ed276cfd38aa557.tar.bz2 |
When PyInt_FromLong() returns NULL, you do not need to check
PyErr_Occurred(). Removed the extra test and setting of a
bogus exception.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 95a0980..ce66e5a 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -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; |