From patchwork Thu Dec 19 22:11:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1213792 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kgWvcg1i"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47f5lX4mZFz9sPL for ; Fri, 20 Dec 2019 09:14:48 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=itQKOEIAvgVyEtmuj0kti/UO4T+TC4E/oMVO5VA6U/0=; b=kgWvcg1i5cfwAf D2YwtVTsnIlHM8i7ESaOnAKjuR/e6+EysVP/HjMwuyPREUxZP5Ycndv1x3qxJ07l6jGTVGtIjTLg3 mVyvqA2zt53MEQj/gn+o26IA2xrVxS5mjoA89MZaDPxzs5ZbKarCQEYwMSOJ6NLzA2ZV3o7Qsx8bg jqyiIq6JIPNYjs+y42UcOGz3gJcNREcCDBPeyEVSjQ0uPR1WJfikfMHJ0/pHZjnww/IzJZkM26LvE TTP42+RN3Ryu90pM7KkecvHDxrLJIfP/kTNz0ugUZ5PQxDEu0PIWlobYyf0mlXRxmCzEjj6mfmUgs 8J6+oxAmLHSrTOjpHu/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii44E-0001fW-Qk; Thu, 19 Dec 2019 22:14:46 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii41L-00055N-R8 for openwrt-devel@lists.openwrt.org; Thu, 19 Dec 2019 22:11:51 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 5EADC4BD2; Thu, 19 Dec 2019 23:11:46 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 491a31bb; Thu, 19 Dec 2019 23:11:37 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Thu, 19 Dec 2019 23:11:22 +0100 Message-Id: <20191219221125.22646-14-ynezz@true.cz> In-Reply-To: <20191219221125.22646-1-ynezz@true.cz> References: <20191219221125.22646-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191219_141148_071806_70A3D887 X-CRM114-Status: UNSURE ( 6.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH ubus 13/16] ubus_common: remove duplicate ARRAY_SIZE and add missing include X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org ARRAY_SIZE is available from libubox/utils.h. Signed-off-by: Petr Štetiar --- ubus_common.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ubus_common.h b/ubus_common.h index 5e4d0ad94f8f..502e5c484a75 100644 --- a/ubus_common.h +++ b/ubus_common.h @@ -14,13 +14,11 @@ #ifndef __UBUS_COMMON_H #define __UBUS_COMMON_H +#include + #define UBUS_SIGNATURE_METHOD (BLOBMSG_TYPE_LAST + 1) #define UBUS_SIGNATURE_END (BLOBMSG_TYPE_LAST + 2) -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - static inline bool ubus_strmatch_len(const char *s1, const char *s2, int *len) { for (*len = 0; s1[*len] == s2[*len]; (*len)++)