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:
Mrx 2026-09-21 02:17:58 +05:30
parent e135983b21
commit 82ac263d33

View file

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