summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--btrfs-image.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/btrfs-image.c b/btrfs-image.c
index 6eddbd5d..551487fb 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -2786,11 +2786,14 @@ int main(int argc, char *argv[])
}
}
- if ((compress_level > 0 || create == 0) &&
- num_threads == 0) {
- num_threads = sysconf(_SC_NPROCESSORS_ONLN);
- if (num_threads <= 0)
- num_threads = 1;
+ if (compress_level > 0 || create == 0) {
+ if (num_threads == 0) {
+ num_threads = sysconf(_SC_NPROCESSORS_ONLN);
+ if (num_threads <= 0)
+ num_threads = 1;
+ }
+ } else {
+ num_threads = 0;
}
if (create) {