From 05ce4e097aeab6292b59a0d3b792cb403eeb6e03 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 7 Jun 1996 15:21:27 +0000 Subject: changed code which set errno and then returned -1 to use the macro set_errno_and_return_minus_one. --- c/src/exec/posix/src/sched.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'c/src/exec/posix/src/sched.c') diff --git a/c/src/exec/posix/src/sched.c b/c/src/exec/posix/src/sched.c index b66c6fb195..f16bb12757 100644 --- a/c/src/exec/posix/src/sched.c +++ b/c/src/exec/posix/src/sched.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -23,8 +24,7 @@ int sched_setparam( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -37,8 +37,7 @@ int sched_getparam( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -53,8 +52,7 @@ int sched_setscheduler( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -66,8 +64,7 @@ int sched_getscheduler( pid_t pid ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -87,8 +84,7 @@ int sched_get_priority_max( break; default: - errno = EINVAL; - return -1; + set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; @@ -111,8 +107,7 @@ int sched_get_priority_min( break; default: - errno = EINVAL; - return -1; + set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; -- cgit v1.2.3