check_format: Ban atoi, atol, and atoll
We can use spdk_strtol and spdk_stroll instead, which do a better job of catching errors. Change-Id: I09ff75356b932366b6c10cd6953610f609ce4b0e Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/441984 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
e8207e9d5d
commit
ba67c6f690
@ -135,7 +135,7 @@ rm -f whitespace.log
|
|||||||
|
|
||||||
echo -n "Checking for use of forbidden library functions..."
|
echo -n "Checking for use of forbidden library functions..."
|
||||||
|
|
||||||
git grep --line-number -w '\(strncpy\|strcpy\|strcat\|sprintf\|vsprintf\)' -- './*.c' ':!lib/vhost/rte_vhost*/**' > badfunc.log || true
|
git grep --line-number -w '\(atoi\|atol\|atoll\|strncpy\|strcpy\|strcat\|sprintf\|vsprintf\)' -- './*.c' ':!lib/vhost/rte_vhost*/**' > badfunc.log || true
|
||||||
if [ -s badfunc.log ]; then
|
if [ -s badfunc.log ]; then
|
||||||
echo " Forbidden library functions detected"
|
echo " Forbidden library functions detected"
|
||||||
cat badfunc.log
|
cat badfunc.log
|
||||||
|
Loading…
Reference in New Issue
Block a user