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)
commit4320e2fda40ae5057777d4700192a0c55287b66a
tree3421208a7826931a551e67eaf43d7f0524f8cb38
parent428e60e079ba700dad3d883ec12653f1a5cedea6
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]