From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 01/24] lib/librte_eal: import libbsd strlcpy Date: Sun, 13 May 2018 16:56:19 +0200 Message-ID: <1908372.FHAYcbrlyj@xps> References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609032721.121661.6937845392817292798.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 out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 7E2A81CF60 for ; Sun, 13 May 2018 16:56:21 +0200 (CEST) In-Reply-To: <152609032721.121661.6937845392817292798.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" Hi, 12/05/2018 03:58, Andy Green: > Signed-off-by: Andy Green Why do we need to replace rte_strlcpy fallback? GCC 8 complains about the fallback using snprintf? > +/* > + * Copyright (c) 1998 Todd C. Miller > + * > + * Permission to use, copy, modify, and distribute this software for any > + * purpose with or without fee is hereby granted, provided that the above > + * copyright notice and this permission notice appear in all copies. > + */ > + > +size_t > +rte_strlcpy(char *dst, const char *src, size_t siz) > +{ [...] > +} I would like to be sure there is no legal issue with this imported code. [...] > -static inline size_t > -rte_strlcpy(char *dst, const char *src, size_t size) > -{ > - return snprintf(dst, size, "%s", src); > -} > +size_t > +rte_strlcpy(char *dst, const char *src, size_t size);