From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 40/40] rte_string_fns.h: explicit cast for int return to size_t Date: Thu, 10 May 2018 12:17:42 -0700 Message-ID: <20180510121742.137ed26f@xeon-e3> References: <152591991920.119328.14523975619615362920.stgit@localhost.localdomain> <152592058043.119328.8002624265714725703.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Andy Green Return-path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id A4F411BB3D for ; Thu, 10 May 2018 21:17:45 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id p14-v6so1522822pfh.9 for ; Thu, 10 May 2018 12:17:45 -0700 (PDT) In-Reply-To: <152592058043.119328.8002624265714725703.stgit@localhost.localdomain> 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 Thu, 10 May 2018 10:49:40 +0800 Andy Green wrote: > Signed-off-by: Andy Green > --- > lib/librte_eal/common/include/rte_string_fns.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_eal/common/include/rte_string_fns.h > index fcbb42e00..51413a55e 100644 > --- a/lib/librte_eal/common/include/rte_string_fns.h > +++ b/lib/librte_eal/common/include/rte_string_fns.h > @@ -55,7 +55,7 @@ rte_strsplit(char *string, int stringlen, > static inline size_t > rte_strlcpy(char *dst, const char *src, size_t size) > { > - return snprintf(dst, size, "%s", src); > + return (size_t)(unsigned int)snprintf(dst, size, "%s", src); > } > > /* pull in a strlcpy function */ > I would rather see a proper version of strlcpy extracted from libbsd