untabify/style
This commit is contained in:
parent
cef810dafb
commit
4655d5e3df
|
@ -2680,13 +2680,13 @@ sigar_net_interface_name_get(sigar_t *sigar, MIB_IFROW *ifr, PIP_ADAPTER_ADDRESS
|
|||
}
|
||||
|
||||
for (iter = address_list; iter != NULL; iter = iter->Next) {
|
||||
for(lpc = 0; lpc < iter->PhysicalAddressLength; lpc++) {
|
||||
if(iter->PhysicalAddress[lpc] != ifr->bPhysAddr[lpc]) {
|
||||
for (lpc = 0; lpc < iter->PhysicalAddressLength; lpc++) {
|
||||
if (iter->PhysicalAddress[lpc] != ifr->bPhysAddr[lpc]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(lpc == iter->PhysicalAddressLength) {
|
||||
if (lpc == iter->PhysicalAddressLength) {
|
||||
match = malloc(MAX_INTERFACE_NAME_LEN);
|
||||
wcstombs(match, iter->FriendlyName, MAX_INTERFACE_NAME_LEN);
|
||||
match[MAX_INTERFACE_NAME_LEN-1] = 0;
|
||||
|
@ -2750,9 +2750,10 @@ sigar_net_interface_list_get(sigar_t *sigar,
|
|||
}
|
||||
else if (ifr->dwType == MIB_IF_TYPE_LOOPBACK) {
|
||||
friendly = sigar_net_interface_name_get(sigar, ifr, address_list);
|
||||
if(friendly == NULL) {
|
||||
if (friendly == NULL) {
|
||||
sprintf(name, "lo%d", lo++);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly);
|
||||
}
|
||||
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) ||
|
||||
(ifr->dwType == IF_TYPE_IEEE80211))
|
||||
{
|
||||
if(strstr(ifr->bDescr, "Scheduler") == NULL
|
||||
&& strstr(ifr->bDescr, "Filter") == NULL) {
|
||||
if ((strstr(ifr->bDescr, "Scheduler") == NULL) &&
|
||||
(strstr(ifr->bDescr, "Filter") == NULL))
|
||||
{
|
||||
friendly = sigar_net_interface_name_get(sigar, ifr, address_list);
|
||||
}
|
||||
|
||||
if(friendly == NULL) {
|
||||
if (friendly == NULL) {
|
||||
snprintf(name, ifr->dwDescrLen, "%s", ifr->bDescr);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
snprintf(name, MAX_INTERFACE_NAME_LEN, "%s", friendly);
|
||||
}
|
||||
name[MAX_INTERFACE_NAME_LEN] = 0;
|
||||
|
|
Loading…
Reference in New Issue