From: Kees Cook Date: Mon, 16 May 2016 12:55:58 +0000 (-0700) Subject: coccicheck: Fix missing 0 index in kill loop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2552a39facb6609007a02eeda5d5edee4fcaca30;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Nicolas Palix Acked-by: Julia Lawall Signed-off-by: Michal Marek --- diff --git a/scripts/coccicheck b/scripts/coccicheck index b2d758188f2f..dd85a455b2ba 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -98,7 +98,7 @@ run_cmd() { } kill_running() { - for i in $(seq $(( NPROC - 1 )) ); do + for i in $(seq 0 $(( NPROC - 1 )) ); do if [ $VERBOSE -eq 2 ] ; then echo "Killing ${SPATCH_PID[$i]}" fi