diff options
| author | Mike Makonnen <mtm@FreeBSD.org> | 2004-02-18 15:22:52 +0000 | 
|---|---|---|
| committer | Mike Makonnen <mtm@FreeBSD.org> | 2004-02-18 15:22:52 +0000 | 
| commit | b325a9208792ca3a5054aa634f4389dc4acbfb89 (patch) | |
| tree | 7e0a46cf96907f599b56e5296486ae17afaa92be /lib/libthr/thread/thr_mutex_protocol.c | |
| parent | a561651c343248c31c01826c080437c5f9ccc1a0 (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_mutex_protocol.c')
| -rw-r--r-- | lib/libthr/thread/thr_mutex_protocol.c | 29 | 
1 files changed, 10 insertions, 19 deletions
| diff --git a/lib/libthr/thread/thr_mutex_protocol.c b/lib/libthr/thread/thr_mutex_protocol.c index f7be5a60605f..56c8622555a3 100644 --- a/lib/libthr/thread/thr_mutex_protocol.c +++ b/lib/libthr/thread/thr_mutex_protocol.c @@ -43,28 +43,19 @@ __weak_reference(_pthread_mutexattr_setprotocol, pthread_mutexattr_setprotocol);  int  _pthread_mutexattr_getprotocol(pthread_mutexattr_t *mattr, int *protocol)  { -	int ret = 0; - -	if ((mattr == NULL) || (*mattr == NULL)) -		ret = EINVAL; -	else -		*protocol = (*mattr)->m_protocol; - -	return(ret); +	if (*mattr == NULL) +		return (EINVAL); +	*protocol = (*mattr)->m_protocol; +	return(0);  }  int  _pthread_mutexattr_setprotocol(pthread_mutexattr_t *mattr, int protocol)  { -	int ret = 0; - -	if ((mattr == NULL) || (*mattr == NULL) || -	    (protocol < PTHREAD_PRIO_NONE) || (protocol > PTHREAD_PRIO_PROTECT)) -		ret = EINVAL; -	else { -		(*mattr)->m_protocol = protocol; -		(*mattr)->m_ceiling = PTHREAD_MAX_PRIORITY; -	} -	return(ret); +	if (*mattr == NULL || protocol < PTHREAD_PRIO_NONE || +	    protocol > PTHREAD_PRIO_PROTECT) +		return (EINVAL); +	(*mattr)->m_protocol = protocol; +	(*mattr)->m_ceiling = PTHREAD_MAX_PRIORITY; +	return(0);  } - | 
