From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:33117 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeCTPr1 (ORCPT ); Tue, 20 Mar 2018 11:47:27 -0400 Received: by mail-pg0-f68.google.com with SMTP id g12so775198pgs.0 for ; Tue, 20 Mar 2018 08:47:27 -0700 (PDT) Subject: Re: [PATCH iproute2 2/5] tunnel: use strlcpy to avoid strncpy warnings To: Stephen Hemminger , netdev@vger.kernel.org References: <20180319165638.30166-1-stephen@networkplumber.org> <20180319165638.30166-3-stephen@networkplumber.org> From: David Ahern Message-ID: <6302c25c-d3c0-f034-0756-40c0900cb6ac@gmail.com> Date: Tue, 20 Mar 2018 09:47:24 -0600 MIME-Version: 1.0 In-Reply-To: <20180319165638.30166-3-stephen@networkplumber.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/19/18 10:56 AM, Stephen Hemminger wrote: > Fixes warnings about strncpy size by using strlcpy. > > tunnel.c: In function ‘tnl_gen_ioctl’: > tunnel.c:145:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] > strncpy(ifr.ifr_name, name, IFNAMSIZ); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Stephen Hemminger > --- > ip/tunnel.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > Acked-by: David Ahern