From dcc73a8ddac3311936c9737f8ebbf2f448bc1f8f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Dec 2005 23:49:41 +0000 Subject: * pthread_mutex_destroy.c: Set mutex type to an invalid value. * pthread_mutex_lock.c: Return EINVAL for invalid mutex type. * pthread_mutex_trylock.c: Likewise. * pthread_mutex_timedlock.c: Likewise. * pthread_mutex_unlock.c: Likewise. --- nptl/pthread_mutex_timedlock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'nptl/pthread_mutex_timedlock.c') diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c index 1cd2c7e606..06bdf9d1cc 100644 --- a/nptl/pthread_mutex_timedlock.c +++ b/nptl/pthread_mutex_timedlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -70,8 +70,6 @@ pthread_mutex_timedlock (mutex, abstime) /* FALLTHROUGH */ - default: - /* Correct code cannot set any other type. */ case PTHREAD_MUTEX_TIMED_NP: simple: /* Normal mutex. */ @@ -104,6 +102,10 @@ pthread_mutex_timedlock (mutex, abstime) mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8; } break; + + default: + /* Correct code cannot set any other type. */ + return EINVAL; } if (result == 0) -- cgit v1.2.3