[Python-checkins] python/dist/src/Python thread_pthread.h, 2.55, 2.56

arigo@users.sourceforge.net arigo at users.sourceforge.net
Tue Sep 20 20:07:51 CEST 2005


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18091

Modified Files:
	thread_pthread.h 
Log Message:
Don't call memset() before checking that the ptr is not NULL.


Index: thread_pthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v
retrieving revision 2.55
retrieving revision 2.56
diff -u -d -r2.55 -r2.56
--- thread_pthread.h	28 Mar 2005 12:34:20 -0000	2.55
+++ thread_pthread.h	20 Sep 2005 18:07:47 -0000	2.56
@@ -355,8 +355,8 @@
 		PyThread_init_thread();
 
 	lock = (pthread_lock *) malloc(sizeof(pthread_lock));
-	memset((void *)lock, '\0', sizeof(pthread_lock));
 	if (lock) {
+		memset((void *)lock, '\0', sizeof(pthread_lock));
 		lock->locked = 0;
 
 		status = pthread_mutex_init(&lock->mut,



More information about the Python-checkins mailing list