mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 12:50:17 +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));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 520542fc45)
This commit is contained in:
parent
a8411d11f8
commit
c5ae1c5ead
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,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