coccicheck: Fix missing 0 index in kill loop
authorKees Cook <keescook@chromium.org>
Mon, 16 May 2016 12:55:58 +0000 (05:55 -0700)
committerMichal Marek <mmarek@suse.com>
Thu, 19 May 2016 07:56:59 +0000 (09:56 +0200)
By default, "seq" counts from 1, but processes were starting counting
from 0, so when interrupted, coccicheck would leave the 0th process
running.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/coccicheck

index b2d7581..dd85a45 100755 (executable)
@@ -98,7 +98,7 @@ run_cmd() {
 }
 
 kill_running() {
-       for i in $(seq $(( NPROC - 1 )) ); do
+       for i in $(seq $(( NPROC - 1 )) ); do
                if [ $VERBOSE -eq 2 ] ; then
                        echo "Killing ${SPATCH_PID[$i]}"
                fi