mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
fix some strncpy warnings when build with gcc8
This commit is contained in:
@@ -507,7 +507,7 @@ iw_set_ext(int skfd, /* Socket to the kernel */
|
||||
struct iwreq * pwrq) /* Fixed part of the request */
|
||||
{
|
||||
/* Set device name */
|
||||
strncpy(pwrq->ifr_name, ifname, IFNAMSIZ);
|
||||
strncpy(pwrq->ifr_name, ifname, IFNAMSIZ-1);
|
||||
/* Do the request */
|
||||
return(ioctl(skfd, request, pwrq));
|
||||
}
|
||||
@@ -523,7 +523,7 @@ iw_get_ext(int skfd, /* Socket to the kernel */
|
||||
struct iwreq * pwrq) /* Fixed part of the request */
|
||||
{
|
||||
/* Set device name */
|
||||
strncpy(pwrq->ifr_name, ifname, IFNAMSIZ);
|
||||
strncpy(pwrq->ifr_name, ifname, IFNAMSIZ-1);
|
||||
/* Do the request */
|
||||
return(ioctl(skfd, request, pwrq));
|
||||
}
|
||||
|
Reference in New Issue
Block a user