Skip to content

Commit 2552a39

Browse files
keesMichal Marek
authored andcommitted
coccicheck: Fix missing 0 index in kill loop
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>
1 parent 65a9f31 commit 2552a39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/coccicheck‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ run_cmd() {
9898
}
9999

100100
kill_running() {
101-
for i in $(seq $(( NPROC - 1 )) ); do
101+
for i in $(seq 0 $(( NPROC - 1 )) ); do
102102
if [ $VERBOSE -eq 2 ] ; then
103103
echo "Killing ${SPATCH_PID[$i]}"
104104
fi

0 commit comments

Comments
 (0)