sscanf_return: warn about propagating scanf() returns
commit12a0c5c7b712359bf559f9b17c237956e6385a4f
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 16 Feb 2021 12:28:21 +0000 (16 15:28 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 16 Feb 2021 12:28:21 +0000 (16 15:28 +0300)
tree853954ced9042b80ba36c5fd1b1974efda2732ed
parent08cc1a5d5dee1a6ca7b27282e5fb1ec8253fd374
sscanf_return: warn about propagating scanf() returns

This code will warn about code like this:

ret = sscanf();
if (ret != 2)
return ret;

Instead of "return ret;" this should be "return -EINVAL;".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_list.h
check_sscanf_return.c [new file with mode: 0644]