From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: [iproute PATCH] rdma: Fix for ineffective check in add_filter() Date: Thu, 18 Oct 2018 13:41:54 +0200 Message-ID: <20181018114154.8886-1-phil@nwl.cc> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, Arkadi Sharshevsky To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:32848 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727439AbeJRTmn (ORCPT ); Thu, 18 Oct 2018 15:42:43 -0400 Sender: netdev-owner@vger.kernel.org List-ID: With 'name' field defined as array in struct filters, it will always contain a value irrespective of whether a name was assigned or not. Fix this by turning the field into a const char pointer. Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction") Signed-off-by: Phil Sutter --- rdma/rdma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index d4b7ba1918b13..c3b7530b6cc71 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -34,7 +34,7 @@ #define MAX_NUMBER_OF_FILTERS 64 struct filters { - char name[32]; + const char *name; bool is_number; }; -- 2.19.0