Message ID | 20171208142213.19153-1-ardeleanalex@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Kr0nYuiK"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tyMIijbK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ytZM0673Nz9sPm for <incoming@patchwork.ozlabs.org>; Sat, 9 Dec 2017 01:22:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LtYudRINzLiVwMc6wZ/V6PyjpUZOwCJbObZcHuAdr3U=; b=Kr0nYuiK9PCNno tnfjQqCXXW9QO+2/rJCWm1hacb5hqyVp/E0qkpuNkfYzAz3VVq/xdLgC4R1ImnjddAWTVK72lPsm8 nLu79KbQpOWpEsTQhih7VHRi+TCEAyVcFDlKXT6uFXU5BbBW0uYfxTAV+BrBFRFu0+BB+WDVcW8DJ ViOe/XMGTQF1purRNsTao0cXhqmPKDoRg4y+FSERN9MkaO2pANQwQqLZ0Ud9mPzaq93lTNTlzEkl/ baajNAX2am+R8NZMsL5kZ2wp1oeXhdclRIYU+OKkEriRioiF0Jp/yjwSwWBjcR4zgIJVTzLdwfEuL on61Mb0Xa6PNjaClnwWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNJYB-00043H-7F; Fri, 08 Dec 2017 14:22:51 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNJY7-0003y7-Jn for lede-dev@lists.infradead.org; Fri, 08 Dec 2017 14:22:49 +0000 Received: by mail-wr0-x241.google.com with SMTP id z18so10971505wrb.8 for <lede-dev@lists.infradead.org>; Fri, 08 Dec 2017 06:22:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GS3rXFqTUlErrBWB3eDIMVDARtNvlrx/8e3QOQLKzVM=; b=tyMIijbKoKya6GL2Erf+6zbldCZs5oQyQxuib20QfXjkiQVl46A6cICG2T2u7PGtsd 7kLYPOhRPJ6Ihn0SNckNhko7uUVizeBqrk253ZZP2gJMSctuKjyzfDBm4YMwMYmq34U9 lNa+WVM5kWzFIz4mfAK19+Qf5JEp6c/dRDjywENvewQBEHPepEYyvDgrBDppqPc8M4LR ZbTH6MxJXmCYeaZqBWfBjNalMXqwaJ9Wp1ZEyfv/TQiQ5hIOHbFZI5EwNIC2xfqtJ3tu HD2hFPZ9ztinlW7IGTOMHOEoVYjDMEs3KgDfcXUVvcV5BATFH3zAOuTSSqnW0o2CPVVr DNsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GS3rXFqTUlErrBWB3eDIMVDARtNvlrx/8e3QOQLKzVM=; b=CNT2Cy+qIJIViVDyZ27ckwm1bYV7gdf2H8xdWCKjlPJmpltPY9hMXDCS9AQSW6zRip +ZxKObLgq2VsvSK6kGbKgZ402l6ezpci443u/QuNwikPyMyGWLK3qapkxzBHqpyozow5 QtjvJP0bQjE7gSnQgoJjQ6nk6GTsadX7dEE8+56rOXwv7dHLe4bnkxFCjb8XL5cdvPZc VjKX6RbLcFls7KehTxB0imW0+1PN3xQ1HDhBvXbkpt1xYyXMoTp3FzYQ7CEHV+hFperx JCIgujglSJn3KGG8C3HvhLPcYiSkGZrchNvV7V5vHaQX/bDmdONMxn81tu8m6T5vOWAR EZiQ== X-Gm-Message-State: AJaThX5DXWZb0Wq3qVYbdDKf6BgNwVAK5p+YPGy3ikv7UZqwcqQbzr94 SeRHP3PlUw3L4spy/QxPFaVo1g== X-Google-Smtp-Source: AGs4zMb49HjNww7IS74Cn013mkrYdQ7p2lvT4GzE1yb1rXh2r+t0jZMhv62KQ4HEzHh5qZ2YsESNRA== X-Received: by 10.223.153.162 with SMTP id y31mr26538120wrb.216.1512742944828; Fri, 08 Dec 2017 06:22:24 -0800 (PST) Received: from localhost.localdomain ([5.2.196.146]) by smtp.gmail.com with ESMTPSA id 26sm9117309wrw.19.2017.12.08.06.22.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 06:22:23 -0800 (PST) From: Alexandru Ardelean <ardeleanalex@gmail.com> To: lede-dev@lists.infradead.org Date: Fri, 8 Dec 2017 16:22:13 +0200 Message-Id: <20171208142213.19153-1-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171208_062247_815109_92737494 X-CRM114-Status: UNSURE ( 7.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ardeleanalex[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH][netifd] handler: replace is_error() helper with NULL check X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <lede-dev.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/lede-dev/> List-Post: <mailto:lede-dev@lists.infradead.org> List-Help: <mailto:lede-dev-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=subscribe> Cc: Alexandru Ardelean <ardeleanalex@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Lede-dev" <lede-dev-bounces@lists.infradead.org> Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[LEDE-DEV,netifd] handler: replace is_error() helper with NULL check
|
expand
|
diff --git a/handler.c b/handler.c index 0c4627f..a0b2a57 100644 --- a/handler.c +++ b/handler.c @@ -105,7 +105,7 @@ netifd_parse_script_handler(const char *name, script_dump_cb cb) tok = json_tokener_new(); obj = json_tokener_parse_ex(tok, start, len); - if (!is_error(obj)) { + if (obj) { netifd_init_script_handler(name, obj, cb); json_object_put(obj); json_tokener_free(tok);
The `is_error()` is just a macro that checks that object is NULL (which is considered an error in libjson-c terminology). Newer libjson-c versions have deprecated this. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> --- handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)