From ba67c6f69060355580373214be70f05c0ff6a6f3 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 24 Jan 2019 16:16:06 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/441984 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- scripts/check_format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index a38579f8b..c3c905efe 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -135,7 +135,7 @@ rm -f whitespace.log 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 echo " Forbidden library functions detected" cat badfunc.log