untabify/style

This commit is contained in:
Doug MacEachern 2011-04-12 15:06:33 -07:00
parent cef810dafb
commit 4655d5e3df
1 changed files with 32 additions and 29 deletions

View File

@ -2752,7 +2752,8 @@ sigar_net_interface_list_get(sigar_t *sigar,
friendly = sigar_net_interface_name_get(sigar, ifr, address_list); friendly = sigar_net_interface_name_get(sigar, ifr, address_list);
if (friendly == NULL) { if (friendly == NULL) {
sprintf(name, "lo%d", lo++); sprintf(name, "lo%d", lo++);
} else { }
else {
snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly); snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly);
} }
name[MAX_INTERFACE_NAME_LEN] = 0; name[MAX_INTERFACE_NAME_LEN] = 0;
@ -2761,14 +2762,16 @@ sigar_net_interface_list_get(sigar_t *sigar,
else if ((ifr->dwType == MIB_IF_TYPE_ETHERNET) || else if ((ifr->dwType == MIB_IF_TYPE_ETHERNET) ||
(ifr->dwType == IF_TYPE_IEEE80211)) (ifr->dwType == IF_TYPE_IEEE80211))
{ {
if(strstr(ifr->bDescr, "Scheduler") == NULL if ((strstr(ifr->bDescr, "Scheduler") == NULL) &&
&& strstr(ifr->bDescr, "Filter") == NULL) { (strstr(ifr->bDescr, "Filter") == NULL))
{
friendly = sigar_net_interface_name_get(sigar, ifr, address_list); friendly = sigar_net_interface_name_get(sigar, ifr, address_list);
} }
if (friendly == NULL) { if (friendly == NULL) {
snprintf(name, ifr->dwDescrLen, "%s", ifr->bDescr); snprintf(name, ifr->dwDescrLen, "%s", ifr->bDescr);
} else { }
else {
snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly); snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly);
} }
name[MAX_INTERFACE_NAME_LEN] = 0; name[MAX_INTERFACE_NAME_LEN] = 0;