From 5efc32ebae413748f10f1f92a96ebf030fe7b995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 12 Jul 2019 15:26:48 +0200 Subject: [PATCH] Fix the check-cocci script to scan bin lib fuzz dirs individually, as it was using only the last one --- util/check-cocci | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/check-cocci b/util/check-cocci index d9268b808d..7231596c9d 100755 --- a/util/check-cocci +++ b/util/check-cocci @@ -3,7 +3,10 @@ ret=0 for spatch in cocci/*.spatch; do patch="$(dirname "$spatch")/$(basename "$spatch" .spatch).patch" - spatch --sp-file="$spatch" --use-gitgrep --dir bin --dir lib --dir fuzz --very-quiet > "$patch"; + : > "$patch" + for dir in bin lib fuzz; do + spatch --sp-file="$spatch" --use-gitgrep --dir "$dir" --very-quiet >> "$patch"; + done if [ "$(< "$patch" wc -l)" -gt "0" ]; then cat "$patch" ret=1