From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v8 6/6] devargs: parse bus info Date: Thu, 6 Jul 2017 17:45:02 -0700 Message-ID: <20170706174502.0eaa5d0c@xeon-e3> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Gaetan Rivet Return-path: Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by dpdk.org (Postfix) with ESMTP id 6260F2C8 for ; Fri, 7 Jul 2017 02:45:12 +0200 (CEST) Received: by mail-pg0-f54.google.com with SMTP id u62so8707040pgb.3 for ; Thu, 06 Jul 2017 17:45:12 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 7 Jul 2017 02:03:12 +0200 Gaetan Rivet wrote: > +static int > +bus_name_cmp(const struct rte_bus *bus, const void *_name) > +{ > + const char *name = _name; > + > + return strncmp(bus->name, name, > + strlen(bus->name)); I don't think you need the _name variable hack. C will cast the argument to strncmp