[OpenWrt-Devel] [PATCH v2 10/10] json_script: remove unneed argument check before calling __json_script_file_free().

Yousong Zhou yszhou4tech at gmail.com
Wed Nov 12 08:59:23 EST 2014


NULL check is present at the begining of function body.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 json_script.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/json_script.c b/json_script.c
index 9805b04..7de005d 100644
--- a/json_script.c
+++ b/json_script.c
@@ -592,8 +592,7 @@ static void __json_script_file_free(struct json_script_file *f)
 	next = f->next;
 	free(f);
 
-	if (next)
-		return __json_script_file_free(next);
+	__json_script_file_free(next);
 }
 
 void
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list