summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-17 22:55:06 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-17 22:55:06 (GMT)
commitb8ad024a4e7fdee5885c9a28df06234a5f60e863 (patch)
tree00e0728753cb909fd57a7629120bf87049200f00
parent74fb3039972db03a97852eb5ded0c618e7c60d79 (diff)
downloadcpython-b8ad024a4e7fdee5885c9a28df06234a5f60e863.zip
cpython-b8ad024a4e7fdee5885c9a28df06234a5f60e863.tar.gz
cpython-b8ad024a4e7fdee5885c9a28df06234a5f60e863.tar.bz2
Add 'return' keyword before error calls.
-rw-r--r--Modules/termios.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index 5dfe57f..12418b5 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -33,7 +33,7 @@ termios_tcgetattr(self, args)
return NULL;
if (tcgetattr(fd, &mode) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
ispeed = cfgetispeed(&mode);
ospeed = cfgetospeed(&mode);
@@ -133,11 +133,11 @@ termios_tcsetattr(self, args)
}
if (cfsetispeed(&mode, (speed_t) ispeed) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
if (cfsetospeed(&mode, (speed_t) ospeed) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
if (tcsetattr(fd, when, &mode) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
Py_INCREF(Py_None);
return Py_None;
@@ -156,7 +156,7 @@ termios_tcsendbreak(self, args)
if (!PyArg_Parse(args, "(ii)", &fd, &duration))
return NULL;
if (tcsendbreak(fd, duration) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
Py_INCREF(Py_None);
return Py_None;
@@ -176,7 +176,7 @@ termios_tcdrain(self, args)
if (!PyArg_Parse(args, "i", &fd))
return NULL;
if (tcdrain(fd) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
Py_INCREF(Py_None);
return Py_None;
@@ -196,7 +196,7 @@ termios_tcflush(self, args)
if (!PyArg_Parse(args, "(ii)", &fd, &queue))
return NULL;
if (tcflush(fd, queue) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
Py_INCREF(Py_None);
return Py_None;
@@ -216,7 +216,7 @@ termios_tcflow(self, args)
if (!PyArg_Parse(args, "(ii)", &fd, &action))
return NULL;
if (tcflow(fd, action) == -1)
- PyErr_SetFromErrno(TermiosError);
+ return PyErr_SetFromErrno(TermiosError);
Py_INCREF(Py_None);
return Py_None;