From: Phil Sutter Date: Thu, 18 Oct 2018 11:41:54 +0000 (+0200) Subject: rdma: Fix for ineffective check in add_filter() X-Git-Tag: v4.19.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b0070f6b1a319b7d6a431a39270a4804cb5927e;p=thirdparty%2Fiproute2.git rdma: Fix for ineffective check in add_filter() 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: 1174be72d1b4c ("rdma: Add filtering infrastructure") Signed-off-by: Phil Sutter Signed-off-by: Stephen Hemminger --- diff --git a/rdma/rdma.h b/rdma/rdma.h index d4b7ba191..c3b7530b6 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; };