Commit 9d36ee9b4003050683eace1ed6a89be5a9f2a518

Con Kolivas 2011-12-24T09:33:30

Do not add blank lines when there are less cpu threads enabled than processors.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/main.c b/main.c
index 036a31a..6c31749 100644
--- a/main.c
+++ b/main.c
@@ -5829,7 +5829,13 @@ int main (int argc, char *argv[])
 	logcursor = 8;
 	gpucursor = logcursor;
 	cpucursor = gpucursor + nDevs;
-	logstart = cpucursor + (opt_n_threads ? num_processors : 0) + 1;
+	logstart = cpucursor + 1;
+	if (opt_n_threads) {
+		if (opt_n_threads < num_processors)
+			logstart += opt_n_threads;
+		else
+			logstart += num_processors;
+	}
 	logcursor = logstart + 1;
 
 	if (opt_realquiet)