From: cristy Date: Sun, 12 Sep 2010 19:53:17 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~8947 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=454314420d7c4f3cd6e1d1a241fc1cec89d65381;p=imagemagick --- diff --git a/magick/thread-private.h b/magick/thread-private.h index 9275625e3..c64279505 100644 --- a/magick/thread-private.h +++ b/magick/thread-private.h @@ -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