mirror of
https://github.com/nmap/nmap.git
synced 2026-11-28 10:30:14 +00:00
Remove unused variable and memset in getNetworkInterfaceName()
The local 'src' sockaddr_storage and its memset were never used: route_dst() is called with NULL source/destination-route args, so drop the dead declaration. Fixes #3034.
This commit is contained in:
parent
e135983b21
commit
82ac263d33
1 changed files with 0 additions and 2 deletions
|
|
@ -488,12 +488,10 @@ int getNetworkInterfaceName(u32 destination, char *dev){
|
|||
* @warning "*dev" must be able to hold at least 16 bytes */
|
||||
int getNetworkInterfaceName(struct sockaddr_storage *dst, char *dev){
|
||||
struct route_nfo rnfo;
|
||||
struct sockaddr_storage src;
|
||||
bool result=false;
|
||||
if(dev==NULL)
|
||||
nping_fatal(QT_3, "getNetworkInterfaceName(): NULL value supplied.");
|
||||
memset(&rnfo, 0, sizeof(struct route_nfo) );
|
||||
memset(&src, 0, sizeof(struct sockaddr_in) );
|
||||
result=route_dst(dst, &rnfo, NULL, NULL);
|
||||
if( result == false )
|
||||
return OP_FAILURE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue