fix pthread error handling
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 23 Mar 2010 05:25:02 +0000 (01:25 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 23 Mar 2010 05:25:02 +0000 (01:25 -0400)
libust/tracectl.c

index 6c839291af6f54a41ca3023dcc041b987f1baa66..1dee6165abc3dbad9cefcc6ec517cc39b7085b7a 100644 (file)
@@ -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));
        }
 }
 
This page took 0.024267 seconds and 4 git commands to generate.