mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 00:45:22 +08:00
[netdev] Add a non-null judgment to the netstat command.|为 netstat 命令添加非空判断。
This commit is contained in:
@@ -1159,7 +1159,14 @@ static void netdev_cmd_netstat(void)
|
||||
}
|
||||
}
|
||||
|
||||
netdev->ops->netstat(netdev);
|
||||
if (netdev->ops->netstat != RT_NULL)
|
||||
{
|
||||
netdev->ops->netstat(netdev);
|
||||
}
|
||||
else
|
||||
{
|
||||
rt_kprintf("netstat: this command is not supported!\n");
|
||||
}
|
||||
}
|
||||
|
||||
int netdev_netstat(int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user