From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 45C381BA0A for ; Fri, 11 May 2018 02:13:35 +0200 (CEST) To: Stephen Hemminger Cc: dev@dpdk.org References: <152591991920.119328.14523975619615362920.stgit@localhost.localdomain> <152592058043.119328.8002624265714725703.stgit@localhost.localdomain> <20180510121742.137ed26f@xeon-e3> From: Andy Green Message-ID: <994727d1-45b2-cb6d-dcbd-b1f3cd89c558@warmcat.com> Date: Fri, 11 May 2018 08:13:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: <20180510121742.137ed26f@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 40/40] rte_string_fns.h: explicit cast for int return to size_t X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2018 00:13:35 -0000 On 05/11/2018 03:17 AM, Stephen Hemminger wrote: > 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 I also have done this and will push later. It's not inline any more. -Andy