]> git.baikalelectronics.ru Git - uboot.git/commit
scripts/coccinelle: add some more coccinelle tests
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 8 Mar 2018 19:56:17 +0000 (20:56 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 9 Mar 2018 17:31:07 +0000 (12:31 -0500)
commit50dfa598cb1bd233cad44b8d654469b0f5416478
tree3421208a7826931a551e67eaf43d7f0524f8cb38
parenta11f0d645d5834313f2d935c46bbe33ede4b7026
scripts/coccinelle: add some more coccinelle tests

kmerr: verify that malloc and calloc are followed by a check to verify
that we are not out of memory.

badzero: Compare pointer-typed values to NULL rather than 0

Both checks are copied from the Linux kernel archive.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
scripts/coccinelle/null/badzero.cocci [new file with mode: 0644]
scripts/coccinelle/null/kmerr.cocci [new file with mode: 0644]