From: Ulrich Drepper Date: Wed, 19 Nov 1997 23:53:54 +0000 (+0000) Subject: cfsetspeed): Change return value to int. X-Git-Tag: cvs/glibc-2_0_6-pre2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7625bfe1d12f309332c90b4a562983bb81a2d080;p=thirdparty%2Fglibc.git cfsetspeed): Change return value to int. --- 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; }