From 7625bfe1d12f309332c90b4a562983bb81a2d080 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Nov 1997 23:53:54 +0000 Subject: [PATCH] cfsetspeed): Change return value to int. --- termios/cfsetspeed.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/termios/cfsetspeed.c b/termios/cfsetspeed.c index b3c8aa3f424..91f420163e9 100644 --- a/termios/cfsetspeed.c +++ b/termios/cfsetspeed.c @@ -102,7 +102,7 @@ static struct speed_struct /* Set both the input and output baud rates stored in *TERMIOS_P to SPEED. */ -void +int cfsetspeed (struct termios *termios_p, speed_t speed) { size_t cnt; @@ -112,14 +112,16 @@ cfsetspeed (struct termios *termios_p, speed_t speed) { cfsetispeed (termios_p, speed); cfsetospeed (termios_p, speed); - return; + return 0; } else if (speed == speeds[cnt].value) { cfsetispeed (termios_p, speeds[cnt].internal); cfsetospeed (termios_p, speeds[cnt].internal); - return; + return 0; } __set_errno (EINVAL); + + return -1; } -- 2.47.2