From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH] scripts: fix checkpatch from standard input Date: Mon, 21 Nov 2016 23:42:41 +0100 Message-ID: <1479768161-6123-1-git-send-email-thomas.monjalon@6wind.com> To: dev@dpdk.org Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 64D4F29D6 for ; Mon, 21 Nov 2016 23:43:06 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id g23so7123828wme.1 for ; Mon, 21 Nov 2016 14:43:06 -0800 (PST) Received: from XPS13.localdomain (guy78-1-82-235-116-147.fbx.proxad.net. [82.235.116.147]) by smtp.gmail.com with ESMTPSA id v202sm21946257wmv.8.2016.11.21.14.43.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 14:43:02 -0800 (PST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When checking a valid patch from standard input, the footer lines of the report are not filtered out. The function check is called outside of any loop, so the statement continue has no effect and the footer is printed. Fixes: 8005feef421d ("scripts: add standard input to checkpatch") Signed-off-by: Thomas Monjalon --- scripts/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatches.sh b/scripts/checkpatches.sh index 336cc7b..cfe262b 100755 --- a/scripts/checkpatches.sh +++ b/scripts/checkpatches.sh @@ -94,7 +94,7 @@ check () { # else report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null) fi - [ $? -ne 0 ] || continue + [ $? -ne 0 ] || return 0 $verbose || printf '\n### %s\n\n' "$3" printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p' status=$(($status + 1)) -- 2.7.0