Skip to content

Commit

Permalink
Coccinelle: ifnullfree: Trim the warning reported in report mode
Browse files Browse the repository at this point in the history
Remove the unncessary part of the warning reported, in the report
mode, so that a single warning produced does not exceed more than line
and hence improve readability of the warnings produced in the subsequent
reports to a file.

Signed-off-by: Himanshu Jha <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
himanshujha199640 authored and masahir0y committed Jan 16, 2018
1 parent d8e7eb5 commit 3e47599
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/coccinelle/free/ifnullfree.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ cocci.print_main("NULL check before that freeing function is not needed", p)
p << r.p;
@@
msg = "WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values."
msg = "WARNING: NULL check before some freeing functions is not needed."
coccilib.report.print_report(p[0], msg)

0 comments on commit 3e47599

Please sign in to comment.