From: Zdeněk Salvet Date: Wed, 28 May 2008 15:52:54 +0000 (+0000) Subject: Use reasonable type to print thread id. X-Git-Tag: glite-lb-client_R_3_2_1_1~7 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=9c326add77d474c0ecb0b6dc2c1dde62e9bde08d;p=jra1mw.git Use reasonable type to print thread id. Don't return random exit code. --- diff --git a/org.glite.lb.client/examples/user_jobs_threaded.c b/org.glite.lb.client/examples/user_jobs_threaded.c index 068fecd..993f622 100644 --- a/org.glite.lb.client/examples/user_jobs_threaded.c +++ b/org.glite.lb.client/examples/user_jobs_threaded.c @@ -73,7 +73,7 @@ void *thread_code(thread_code_args *arguments) { sl = (unsigned long) ((double) random()/ RAND_MAX * arguments->rand_start * 1000000); - printf("Thread [%d] - sleeping for %ld us\n",pthread_self(),sl); + printf("Thread [%lu] - sleeping for %ld us\n",(unsigned long)pthread_self(),sl); usleep( sl ); user_jobs = edg_wll_UserJobs; @@ -221,5 +221,6 @@ int main(int argc,char **argv) // exit(0); // pthread_exit(NULL); + return 0; }