mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
pthread_mutexattr_setprotocol: remove the unreached dead code
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -54,8 +54,6 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
|
|||||||
linfo("attr=%p protocol=%d\n", attr, protocol);
|
linfo("attr=%p protocol=%d\n", attr, protocol);
|
||||||
DEBUGASSERT(attr != NULL);
|
DEBUGASSERT(attr != NULL);
|
||||||
|
|
||||||
if (protocol >= PTHREAD_PRIO_NONE && protocol <= PTHREAD_PRIO_PROTECT)
|
|
||||||
{
|
|
||||||
switch (protocol)
|
switch (protocol)
|
||||||
{
|
{
|
||||||
case PTHREAD_PRIO_NONE:
|
case PTHREAD_PRIO_NONE:
|
||||||
@@ -81,11 +79,8 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
|
|||||||
#endif /* CONFIG_PRIORITY_PROTECT */
|
#endif /* CONFIG_PRIORITY_PROTECT */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ENOTSUP;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user