From 18cbdbac7dc495571984b347adf0af1810b2f007 Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Tue, 23 Mar 2010 01:25:02 -0400 Subject: [PATCH] fix pthread error handling --- libust/tracectl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libust/tracectl.c b/libust/tracectl.c index 6c83929..1dee616 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -1303,12 +1303,12 @@ static void stop_listener() int result; result = pthread_cancel(listener_thread); - if(result == -1) { - PERROR("pthread_cancel"); + if(result != 0) { + ERR("pthread_cancel: %s", strerror(result)); } result = pthread_join(listener_thread, NULL); - if(result == -1) { - PERROR("pthread_join"); + if(result != 0) { + ERR("pthread_join: %s", strerror(result)); } } -- 2.34.1