指针数组:
char *ifname[5] = {0};
char *port_num[10] = {0};
for(i=0; i
ifname[i] = (char*)malloc(32);
memset(ifname[i], 0x00, 32);
port_num[i] = (char*)malloc(4);
memset(port_num[i], 0x00, 4);
}
for(i=0; i
if(ifname[i] != null)
{
free(ifname[i]);
}
if(port_num[i] != null)
{
free(port_num[i]);
}
}
for(i=0; i
if(netns_port_mac[i] != null)
{
free(netns_port_mac[i]);
}
if(netns_port_num[i] != null)
{
free(netns_port_num[i]);
}
}
阅读(1141) | 评论(0) | 转发(0) |