]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tunnel: use strlcpy to avoid strncpy warnings
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Mar 2018 16:34:01 +0000 (09:34 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 29 Mar 2018 15:30:28 +0000 (08:30 -0700)
commitfcb18aa3d95392562be0c0a8f64424068ba146c8
treeb5952f0a4b0367639fd8bea36c777a3955e16f2c
parentfc9d755a3e7c25868a4cd63da1136d6abcc6474a
tunnel: use strlcpy to avoid strncpy warnings

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 <stephen@networkplumber.org>
ip/tunnel.c