Use reasonable type to print thread id.
authorZdeněk Salvet <salvet@ics.muni.cz>
Wed, 28 May 2008 15:52:54 +0000 (15:52 +0000)
committerZdeněk Salvet <salvet@ics.muni.cz>
Wed, 28 May 2008 15:52:54 +0000 (15:52 +0000)
Don't return random exit code.

org.glite.lb.client/examples/user_jobs_threaded.c

index 068fecd..993f622 100644 (file)
@@ -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;
 }