]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 12 Sep 2010 19:53:17 +0000 (19:53 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 12 Sep 2010 19:53:17 +0000 (19:53 +0000)
magick/thread-private.h

index 9275625e32ab4f9557ab703ba9e53e9f125bfb3b..c642795058faf8eaab4ed32c25c6a5117cf09c3e 100644 (file)
@@ -96,11 +96,15 @@ static inline size_t GetOpenMPMaximumThreads(void)
 {
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP >= 200203)
   {
+    ssize_t
+      threads;
+
     static size_t
       maximum_threads = 1UL;
 
-    if (omp_get_max_threads() > (ssize_t) maximum_threads)
-      maximum_threads=omp_get_max_threads();
+    threads=omp_get_max_threads();
+    if (threads > (ssize_t) maximum_threads)
+      maximum_threads=threads;
     return(maximum_threads);
   }
 #else