mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 12:00:11 +01:00
ppp-manager: fix build with GCC 8
src/ppp/nm-ppp-manager.c: In function ‘monitor_cb’: src/ppp/nm-ppp-manager.c:184:2: error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation] strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
5052c8793d
commit
520542fc45
1 changed files with 1 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ monitor_cb (gpointer user_data)
|
|||
memset (&stats, 0, sizeof (stats));
|
||||
req.ifr_data = (caddr_t) &stats;
|
||||
|
||||
strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name));
|
||||
nm_utils_ifname_cpy (req.ifr_name, priv->ip_iface);
|
||||
if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) {
|
||||
if (errno != ENODEV)
|
||||
_LOGW ("could not read ppp stats: %s", strerror (errno));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue