]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_utilities/lib/threading.cpp
Security-55471.14.8.tar.gz
[apple/security.git] / libsecurity_utilities / lib / threading.cpp
index 3bc71a1105172236b4b899303080ba25844f4f88..0d387181168353d0ebbc32f1a96d48f15756291b 100644 (file)
@@ -213,8 +213,8 @@ void Thread::run()
     {
         syslog(LOG_ERR, "error %d setting thread detach state", err);
     }
     {
         syslog(LOG_ERR, "error %d setting thread detach state", err);
     }
-    while (err = pthread_create(&self.mIdent, &ptattrs, runner, this) && 
-           --ntries)
+    while ((err = pthread_create(&self.mIdent, &ptattrs, runner, this) && 
+           --ntries))
     {
         syslog(LOG_ERR, "pthread_create() error %d", err);
         usleep(50000);          // 50 ms is arbitrary
     {
         syslog(LOG_ERR, "pthread_create() error %d", err);
         usleep(50000);          // 50 ms is arbitrary
@@ -241,6 +241,7 @@ void *Thread::runner(void *arg)
     }
     catch (...)
     {
     }
     catch (...)
     {
+        return NULL;
     }
 }
 
     }
 }