From patchwork Wed Nov 12 13:59:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 419629 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 076F61400D5 for ; Wed, 10 Dec 2014 23:22:49 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id F1DF028C200; Wed, 10 Dec 2014 13:16:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_96_XX, FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 08DF828C1E1 for ; Wed, 10 Dec 2014 13:16:29 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 10 Dec 2014 13:16:28 +0100 (CET) Received: by mail-pd0-f180.google.com with SMTP id w10so2696512pde.11 for ; Wed, 10 Dec 2014 04:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wK+8P0r6TcXZVglUtOxQN2ngsoV2dXdHL14IqT6AjvE=; b=phkoxBdCrvw/xM1lNLgZqLeJdmwh11r+2b6ad6tUatMOBKw0hhh0tFxW7xTTjIplk0 RmsmY/JtaRupQ3vJ9IIsewkn/hwCT6vI0HQXvXpth+MRbgdkPt9YGYQyWYa3R3d8a0kr hKdpIMviqp4A/VdiZZSQF25tvZqJwx7EAOkoWQxOeoLOSmcfyY1VDVVpkiRfVE3qU39U mLu+gkhY0gK6Vs4KOQU1LjqmXp6JaVPNXM8EQXuqy+kpG1ikXDgBrdpcU4/jUX04KGLx FXZezke470eU7zZs333nO19y+MI/h8e+3v/IJE4F3IbM9fPe56osLzCa8j2/mX/EOUM7 csmg== X-Received: by 10.68.230.231 with SMTP id tb7mr6760202pbc.42.1418213891722; Wed, 10 Dec 2014 04:18:11 -0800 (PST) Received: from debian.lan ([103.29.140.56]) by mx.google.com with ESMTPSA id hc10sm4063709pbd.78.2014.12.10.04.18.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Dec 2014 04:18:10 -0800 (PST) From: Yousong Zhou To: nbd@openwrt.org Date: Wed, 12 Nov 2014 21:59:23 +0800 Message-Id: <1415800763-14311-11-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1415800763-14311-1-git-send-email-yszhou4tech@gmail.com> References: <1415800763-14311-1-git-send-email-yszhou4tech@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH v2 10/10] json_script: remove unneed argument check before calling __json_script_file_free(). X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" NULL check is present at the begining of function body. Signed-off-by: Yousong Zhou --- 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