aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorBhanusree Pola <[email protected]>2019-03-22 10:38:16 +0800
committerGreg Kroah-Hartman <[email protected]>2019-03-22 15:20:25 +0100
commit561fb35a9d04ca7d1a5b955bcac50c6c4f49227d (patch)
treec5de1abbc9bcc11a2bc119d9d33cc850d5415131 /tools/perf/scripts/python
parent51385436f181d273392400bf8ba4edc2768e1996 (diff)
staging: erofs: Use !x or x in place of NULL comparision
Test for NULL as !x instead of NULL comparisions. Issue found using coccinelle Semantic patch used to solve the problem is as follows // <smpl> @@ expression x; statement S; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); -if(x==NULL) +if(!x) S @@ expression e; @@ -e == NULL +!e // </smpl> Signed-off-by: Bhanusree Pola <[email protected]> [ Gao Xiang: fix x != NULL comparision to x as well. ] Signed-off-by: Gao Xiang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions