summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sort.c b/src/sort.c
index f193e04a0..96e06960d 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -4601,8 +4601,8 @@ main (int argc, char **argv)
{
if (!nthreads)
{
- nthreads = MIN (DEFAULT_MAX_THREADS,
- num_processors (NPROC_CURRENT_OVERRIDABLE));
+ unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE);
+ nthreads = MIN (np, DEFAULT_MAX_THREADS);
}
/* Avoid integer overflow later. */