From 9315fe21ed58b6625fb5f52c443dd635adca8638 Mon Sep 17 00:00:00 2001 From: dongjiuzhu Date: Tue, 1 Dec 2020 10:41:49 +0800 Subject: [PATCH] pthread_mutexattr_getprotocol: modify prototype modify the return value according to posix standard Change-Id: I6e32a8f7a5cac85fe7a395a8115710fdff61d985 Signed-off-by: dongjiuzhu --- libs/libc/pthread/pthread_mutexattr_getprotocol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/libc/pthread/pthread_mutexattr_getprotocol.c b/libs/libc/pthread/pthread_mutexattr_getprotocol.c index b48d54d776..f252a3857a 100644 --- a/libs/libc/pthread/pthread_mutexattr_getprotocol.c +++ b/libs/libc/pthread/pthread_mutexattr_getprotocol.c @@ -70,9 +70,11 @@ int pthread_mutexattr_getprotocol(FAR const pthread_mutexattr_t *attr, #ifdef CONFIG_PRIORITY_INHERITANCE linfo("Returning %d\n", attr->proto); - return attr->proto; + *protocol = attr->proto; #else linfo("Returning %d\n", PTHREAD_PRIO_NONE); - return PTHREAD_PRIO_NONE; + *protocol = PTHREAD_PRIO_NONE; #endif + + return 0; }