diff include/freeDiameter/libfreeDiameter.h @ 183:960764fbc68f

Fix compilation error
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 04 Feb 2010 16:22:55 +0900
parents 1f39f0c51094
children 89d39bcf9ef5
line wrap: on
line diff
--- a/include/freeDiameter/libfreeDiameter.h	Thu Feb 04 16:19:52 2010 +0900
+++ b/include/freeDiameter/libfreeDiameter.h	Thu Feb 04 16:22:55 2010 +0900
@@ -189,7 +189,8 @@
 
 /* Helper for debugging by adding traces -- for debuging a specific location of the code */
 #define TRACE_HERE()	\
-	TRACE_DEBUG(NONE, " -- debug checkpoint -- ");
+	TRACE_DEBUG(NONE, " -- debug checkpoint %d -- ", fd_breakhere());
+int fd_breakhere(void);
 
 /* Helper for tracing the CHECK_* macros bellow -- very very verbose code execution! */
 #define TRACE_DEBUG_ALL( str ) 	\
@@ -477,7 +478,6 @@
 /* Terminate a thread */
 static __inline__ int fd_thr_term(pthread_t * th)
 {
-	int ret = 0;
 	void * th_ret = NULL;
 	
 	CHECK_PARAMS(th);
@@ -490,7 +490,7 @@
 	(void) pthread_cancel(*th);
 	
 	/* Then join the thread */
-	CHECK_POSIX_DO( ret = pthread_join(*th, &th_ret), /* continue */ );
+	CHECK_POSIX( pthread_join(*th, &th_ret) );
 	
 	if (th_ret == PTHREAD_CANCELED) {
 		TRACE_DEBUG(ANNOYING, "The thread %p was canceled", *th);
@@ -501,7 +501,7 @@
 	/* Clean the location */
 	*th = (pthread_t)NULL;
 	
-	return ret;
+	return 0;
 }
 
 /* Cleanups for cancellation (all threads should be safely cancelable...) */
"Welcome to our mercurial repository"