perf check-headers.sh: Fix check-headers.sh opts assignment
Jiri Olsa
reviewerPATCH 1/1 perf check-headers.sh: Fix check-headers.sh opts assignment
Currently opts variable is not zero-ed and we keep on adding to it, ending up with:
$ check-headers.sh 2>&1 + opts=' "-B"' + opts=' "-B" "-B"' + opts=' "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Fixing this by initializing the opts variable.
Signed-off-by Jiri Olsa <[email protected]>
--- tools/perf/check-headers.sh | 1 + 1 file changed, 1 insertion(+)
tools/perf/check-headers.sh +1 -0
@@ -59,6 +59,7 @@ check () { file=$1 shift + opts= while [ -n "$*" ]; do opts="$opts \"$1\"" shift
Signature · 1 line
2.13.6
Arnaldo Carvalho de Melo
maintainerEm Wed, Mar 21, 2018 at 03:05:15PM +0100, Jiri Olsa escreveu:
Quoted 10 lines
Currently opts variable is not zero-ed and we keep on adding to it, ending up with:
$ check-headers.sh 2>&1 + opts=' "-B"' + opts=' "-B" "-B"' + opts=' "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Thanks, tested and applied.
- Arnaldo
tip-bot for Jiri Olsa
merge bot[tip:perf/core] perf build: Fix check-headers.sh opts assignment
In reply to Jiri Olsaperf build: Fix check-headers.sh opts assignment
Commit-ID: b4c786e5aa69c5a75ac3932f81fdf8e8c120c03b Gitweb: https://git.kernel.org/tip/b4c786e5aa69c5a75ac3932f81fdf8e8c120c03b Author: Jiri Olsa <[email protected]> AuthorDate: Wed, 21 Mar 2018 15:05:15 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 27 Mar 2018 13:13:38 -0300
perf build: Fix check-headers.sh opts assignment
Currently the "opts" variable is not zero-ed and we keep on adding to it, ending up with:
$ check-headers.sh 2>&1 + opts=' "-B"' + opts=' "-B" "-B"' + opts=' "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B"' + opts=' "-B" "-B" "-B" "-B" "-B" "-B"'
Fix this by initializing it in the check() function, right before starting the loop.
Signed-off-by Jiri Olsa <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc David Ahern <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/check-headers.sh | 1 + 1 file changed, 1 insertion(+)
tools/perf/check-headers.sh +1 -0
@@ -59,6 +59,7 @@ check () { file=$1 shift + opts= while [ -n "$*" ]; do opts="$opts \"$1\"" shift