mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 19:32:18 +00:00
Silencing sizeof() warning
Here, the sizeof() function return the size of 'char *' instead of INTF_NAME_LEN. I replaced the use of the latter function by INTF_NAME_LEN (maximum size of the array intf_name). Here is the compiler warning output: route-bsd.c:171:38: warning: sizeof on array function parameter will return size of 'char *' instead of 'char [16]' [-Wsizeof-array-argument] strlcpy(intf_name, namebuf, sizeof(intf_name));
This commit is contained in:
parent
d0774e7ed5
commit
900f015726
1 changed files with 1 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ route_msg(route_t *r, int type, char intf_name[INTF_NAME_LEN], struct addr *dst,
|
|||
errno = ESRCH;
|
||||
return (-1);
|
||||
}
|
||||
strlcpy(intf_name, namebuf, sizeof(intf_name));
|
||||
strlcpy(intf_name, namebuf, INTF_NAME_LEN);
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue