From: Bian N. <bi...@cn...> - 2010-11-19 01:16:36
|
Cyril Hrubis wrote: > Hi! >> Destroy mutex an mutex_attr object at end of test. >> >> Signed-off-by: Bian Naimeng <bi...@cn...> >> >> --- >> .../interfaces/pthread_mutex_getprioceiling/3-1.c | 2 ++ >> .../interfaces/pthread_mutex_getprioceiling/3-2.c | 3 +++ >> .../interfaces/pthread_mutex_getprioceiling/3-3.c | 3 +++ >> 3 files changed, 8 insertions(+), 0 deletions(-) >> >> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c >> index d96ae43..5267b63 100644 >> --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c >> +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c >> @@ -62,6 +62,8 @@ main(void) >> } else >> printf("pthread_mutex_getprioceiling passed unexpectedly\n"); >> >> + (void) pthread_mutex_destroy(&mutex); >> + > > Please never use useless cast like this. > Yes,thanks for your review. I will check my patch by kernel's checkpatch.pl before post it next time. >> return (error == EINVAL ? PTS_PASS : PTS_FAIL); >> #else >> printf("pthread_mutex_getprioceiling not supported"); >> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c >> index 843c048..afa12c1 100644 >> --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c >> +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c >> @@ -75,6 +75,9 @@ main(void) >> } else >> printf("pthread_mutex_getprioceiling passed unexpectedly\n"); >> >> + (void) pthread_mutexattr_destroy(&mutex_attr); >> + (void) pthread_mutex_destroy(&mutex); >> + > > And here. > >> return (error == EINVAL ? PTS_PASS : PTS_FAIL); >> #else >> printf("pthread_mutex_getprioceiling not supported"); >> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c >> index cf46f77..4aa6b1c 100644 >> --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c >> +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c >> @@ -76,6 +76,9 @@ main(void) >> } else >> printf("pthread_mutex_getprioceiling passed unexpectedly\n"); >> >> + (void) pthread_mutexattr_destroy(&mutex_attr); >> + (void) pthread_mutex_destroy(&mutex); >> + > > And here. > >> return (error == EINVAL ? PTS_PASS : PTS_UNRESOLVED); >> #else >> printf("pthread_mutex_getprioceiling not supported"); >> -- >> 1.7.0.4 > -- Regards Bian Naimeng |