From 406e1b1eeb2a760c0b89ff141a183c78d113a5e4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 31 Oct 2021 11:57:42 +0100 Subject: Make sure parallel_processes works correctly if std::thread::hardware_concurrency() retuns 0. --- src/libctor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libctor.cc b/src/libctor.cc index 0ec6c6c..84a5fae 100644 --- a/src/libctor.cc +++ b/src/libctor.cc @@ -33,8 +33,7 @@ int main(int argc, char* argv[]) settings.builddir = getConfiguration(cfg::builddir, settings.builddir); settings.parallel_processes = - std::max(1u, std::thread::hardware_concurrency() * 2 - 1); - + std::max(1u, std::thread::hardware_concurrency()) * 2 - 1; if(argc > 1 && std::string(argv[1]) == "configure") { return configure(settings, argc, argv); -- cgit v1.2.3