mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
pmi_macinfo_drac_idrac_mac - simplify - Return immediately if NicNum doesn't meet expectations or UseVirtualMacAddress isn't 0.
This commit is contained in:
parent
f1f2cbb18b
commit
b0294b96fd
@ -1630,7 +1630,10 @@ ipmi_macinfo_drac_idrac_mac(struct ipmi_intf* intf,uint8_t NicNum)
|
|||||||
uint8_t iDRAC6MacAddressByte[MACADDRESSLENGH];
|
uint8_t iDRAC6MacAddressByte[MACADDRESSLENGH];
|
||||||
uint8_t j;
|
uint8_t j;
|
||||||
ipmi_macinfo_drac_idrac_virtual_mac (intf,NicNum);
|
ipmi_macinfo_drac_idrac_virtual_mac (intf,NicNum);
|
||||||
if ((0xff==NicNum || IDRAC_NIC_NUMBER==NicNum) && 0 == UseVirtualMacAddress) {
|
if ((NicNum != 0xff && NicNum != IDRAC_NIC_NUMBER)
|
||||||
|
|| UseVirtualMacAddress != 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
input_length = 0;
|
input_length = 0;
|
||||||
msg_data[input_length++] = LAN_CHANNEL_NUMBER;
|
msg_data[input_length++] = LAN_CHANNEL_NUMBER;
|
||||||
msg_data[input_length++] = MAC_ADDR_PARAM;
|
msg_data[input_length++] = MAC_ADDR_PARAM;
|
||||||
@ -1676,7 +1679,6 @@ ipmi_macinfo_drac_idrac_mac(struct ipmi_intf* intf,uint8_t NicNum)
|
|||||||
}
|
}
|
||||||
printf("%02x", iDRAC6MacAddressByte[j]);
|
printf("%02x", iDRAC6MacAddressByte[j]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user