From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C37EA3798 for ; Thu, 17 Jan 2019 11:39:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2019 02:39:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,488,1539673200"; d="scan'208";a="136549036" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.54]) ([10.237.220.54]) by fmsmga004.fm.intel.com with ESMTP; 17 Jan 2019 02:39:02 -0800 To: Bruce Richardson , dev@dpdk.org References: <20190116124836.40132-1-bruce.richardson@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 17 Jan 2019 10:39:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190116124836.40132-1-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: support strlcat function 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: Thu, 17 Jan 2019 10:39:05 -0000 On 16-Jan-19 12:48 PM, Bruce Richardson wrote: > Add the strlcat function to DPDK to exist alongside the strlcpy one. While > strncat is generally safe for use for concatenation, the API for the > strlcat function is perhaps a little nicer to use, and supports truncation > detection. > > See commit: 5364de644a4b ("eal: support strlcpy function") for more > details on the function selection logic, since we only should be using the > DPDK-provided version when no system-provided version is present. > > Signed-off-by: Bruce Richardson > --- <...> > static int > test_string_fns(void) > { > if (test_rte_strsplit() < 0) > return -1; > + if (test_rte_strlcat() < 0) > + return -1; > return 0; > } > > Unrelated, but do we also need to test strlcpy, strscpy and other functions that were introduced? -- Thanks, Anatoly