Commit 62da03766 for imagemagick.org
commit 62da037663d196f692d7e63705f70ca70959e94e
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Jul 18 15:28:01 2026 -0400
cosmetic
diff --git a/MagickCore/thread-private.h b/MagickCore/thread-private.h
index 420881d6d..067c2270b 100644
--- a/MagickCore/thread-private.h
+++ b/MagickCore/thread-private.h
@@ -57,13 +57,14 @@ static inline int GetMagickNumberThreads(const Image *source,
size_t
max_threads = (size_t) GetMagickResourceLimit(ThreadResource),
number_threads = 1UL,
- rows_per_thread = 64UL*MagickMax(factor,1); /* target workload per thread */
+ rows_per_thread = 64UL*factor; /* target workload per thread */
/*
Determine number of threads based on rows per thread heuristic.
*/
- number_threads=(chunk < rows_per_thread) ? 1UL : MagickMin(max_threads,
- (chunk+rows_per_thread-1)/rows_per_thread);
+ if (rows_per_thread != 0)
+ number_threads=(chunk < rows_per_thread) ? 1UL : MagickMin(max_threads,
+ (chunk+rows_per_thread-1)/rows_per_thread);
/*
Limit threads for non-memory or non-map cache sources/destinations.
*/