10 Mar, 2018
1 commit
-
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
21 Nov, 2017
1 commit
-
Add some useful static code analysis scripts for coccinelle
copied from the Linux kernel v4.14-rc8:Warn on check against NULL before calling free.
scripts/coccinelle/free/ifnullfree.cocciDetect superfluous NULL check for list iterator.
scripts/coccinelle/iterators/itnull.cocciCheck if list iterator is reassigned.
scripts/coccinelle/iterators/list_entry_update.cocciCheck if list iterator is used after loop.
scripts/coccinelle/iterators/use_after_iter.cocciFind wrong argument of sizeof in allocation function:
scripts/coccinelle/misc/badty.cocciSigned-off-by: Heinrich Schuchardt
16 Aug, 2016
1 commit
-
Many Ethernet drivers still use the legacy miiphy API to register their
mdio interface for access to the mdio commands.This semantic patch will convert the drivers from the legacy adapter API
to the more modern alloc/register API.Signed-off-by: Joe Hershberger