summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/speed.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/speed.c')
-rw-r--r--sysdeps/unix/sysv/linux/speed.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 3ac0640b65..6967a0bdf2 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. Linux version.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,8 +34,7 @@
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-cfgetospeed (termios_p)
- const struct termios *termios_p;
+cfgetospeed (const struct termios *termios_p)
{
return termios_p->c_cflag & (CBAUD | CBAUDEX);
}
@@ -45,8 +44,7 @@ cfgetospeed (termios_p)
speed, the numerical 0 is a special case for the input baud rate. It
should set the input baud rate to the output baud rate. */
speed_t
-cfgetispeed (termios_p)
- const struct termios *termios_p;
+cfgetispeed (const struct termios *termios_p)
{
return ((termios_p->c_iflag & IBAUD0)
? 0 : termios_p->c_cflag & (CBAUD | CBAUDEX));
@@ -54,16 +52,11 @@ cfgetispeed (termios_p)
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-cfsetospeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
+cfsetospeed (struct termios *termios_p, speed_t speed)
{
if ((speed & ~CBAUD) != 0
&& (speed < B57600 || speed > __MAX_BAUD))
- {
- __set_errno (EINVAL);
- return -1;
- }
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
termios_p->c_ospeed = speed;
@@ -81,16 +74,11 @@ libc_hidden_def (cfsetospeed)
speed, the numerical 0 is a special case for the input baud rate. It
should set the input baud rate to the output baud rate. */
int
-cfsetispeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
+cfsetispeed (struct termios *termios_p, speed_t speed)
{
if ((speed & ~CBAUD) != 0
&& (speed < B57600 || speed > __MAX_BAUD))
- {
- __set_errno (EINVAL);
- return -1;
- }
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
termios_p->c_ispeed = speed;