fix some strncpy warnings when build with gcc8

Origin commit data
------------------
Commit: 54ccbfc5d1
Author: GetAway <get-away@t-online.de>
Date: 2019-06-18 (Tue, 18 Jun 2019)
This commit is contained in:
GetAway
2019-06-18 22:59:07 +02:00
committed by vanhofen
parent 0310cdaf79
commit bc8a3536cb
3 changed files with 9 additions and 9 deletions

View File

@@ -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));
}