scripts: fix checkpatch from standard input
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 can have no effect and the footer is printed.
More precisons about possible behaviours
- with dash, the 'continue' acts like a return in that case
- with bash, it displays an error:
"continue: only meaningful in a `for', `while', or `until' loop"
- with bash --posix, the 'continue' is ignored
Fixes: 8005feef42
("scripts: add standard input to checkpatch")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
39a46d36fd
commit
b5415fbc69
@ -94,7 +94,7 @@ check () { # <patch> <commit> <title>
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user