[netdev] Add a non-null judgment to the netstat command.|为 netstat 命令添加非空判断。
This commit is contained in:
parent
6da69f6556
commit
04296e97b6
|
@ -1159,8 +1159,15 @@ static void netdev_cmd_netstat(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (netdev->ops->netstat != RT_NULL)
|
||||||
|
{
|
||||||
netdev->ops->netstat(netdev);
|
netdev->ops->netstat(netdev);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rt_kprintf("netstat: this command is not supported!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int netdev_netstat(int argc, char **argv)
|
int netdev_netstat(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue