Skip to content

Commit cd1af7c

Browse files
committed
coccinelle: fix verbose message about .cocci file being run
If you run coccicheck with V=1 and COCCI=, you will see a strange path to the semantic patch file. For example, run the following: $ make V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck [ snip ] The semantic patch that makes this report is available in scriptcoccinelle/free/kfree.cocci. Notice "s/" was dropped from "scripts/coccinelle/free/kfree.cocci". When running coccicheck without O=, $srctree is expanded to ".", which represents one arbitrary character in the regular expression. Using sed is not a good choice here. Strip $srctree/ simply without sed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
1 parent e0be348 commit cd1af7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/coccicheck‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ coccinelle () {
186186

187187
if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then
188188

189-
FILE=`echo $COCCI | sed "s|$srctree/||"`
189+
FILE=${COCCI#$srctree/}
190190

191191
echo "Processing `basename $COCCI`"
192192
echo "with option(s) \"$OPT\""

0 commit comments

Comments
 (0)