BOOLEAN mIp4ConfigExist = FALSE;\r
STATIC EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting = NULL;\r
\r
-STATIC CONST UINTN SEC_TO_NS = 10000000;\r
+STATIC CONST UINTN SecondsToNanoSeconds = 10000000;\r
STATIC CONST CHAR16 DhcpString[5] = L"DHCP";\r
STATIC CONST CHAR16 StaticString[7] = L"STATIC";\r
STATIC CONST CHAR16 PermanentString[10] = L"PERMANENT";\r
Get the child handle of the NIC handle.\r
\r
@param[in] Controller Routing information: GUID.\r
- @param[in] ChildHandle Returned child handle.\r
+ @param[out] ChildHandle Returned child handle.\r
\r
@retval EFI_SUCCESS Successfully to get child handle.\r
**/\r
if (ConfigHdr != NULL) {\r
Length = StrLen (ConfigHdr);\r
} else {\r
- Length = 0;\r
+ ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+ goto ON_EXIT;\r
}\r
ConfigResp = AllocateZeroPool ((Length + NIC_ITEM_CONFIG_SIZE * 2 + 100) * sizeof (CHAR16));\r
+ if (ConfigResp == NULL) {\r
+ ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+ goto ON_EXIT;\r
+ }\r
if (ConfigHdr != NULL) {\r
StrCpy (ConfigResp, ConfigHdr);\r
}\r
Status = gBS->SetTimer (\r
TimerToGetMap,\r
TimerRelative,\r
- MultU64x32 (SEC_TO_NS, 5)\r
+ MultU64x32 (SecondsToNanoSeconds, 5)\r
);\r
\r
if (EFI_ERROR (Status)) {\r