apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject some simplifications for the Netware apr_thread_create code
Date Sun, 14 Oct 2007 01:16:56 GMT
Just removing some unused code.
APR_SUCCESS is deemed to be zero as I understand it, so no use in
checking for it explicitly.

Index: threadproc/netware/thread.c
===================================================================
--- threadproc/netware/thread.c	(revision 584412)
+++ threadproc/netware/thread.c	(working copy)
@@ -125,19 +125,14 @@
      	/* int *error */									   &stat);
 		
      	
-  	stat = NXContextSetName(
+  	NXContextSetName(
 		 	/* NXContext_t ctx */			(*new)->ctx,
 			/* const char *name */			threadName);

-  	stat = NXThreadCreate(
+  	return NXThreadCreate(
         	/* NXContext_t context */		(*new)->ctx,
         	/* long flags */				flags,
         	/* NXThreadId_t *thread_id */	&(*new)->td);
-
-    if(stat==0)
-     	return APR_SUCCESS;
-
-	return(stat);// if error
 }

 apr_os_thread_t apr_os_thread_current()

Mime
View raw message