mirror of https://github.com/acidanthera/audk.git
ShellPkg: Refine code by initializing local variable and adding ASSERT statement.
Add ASSERT statement and initialize local variable to make code more readable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18689 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ae658d9163
commit
c617380446
|
@ -1633,6 +1633,8 @@ EfiShellExecute(
|
|||
UINTN Size;
|
||||
EFI_STATUS CalleeStatusCode;
|
||||
|
||||
CalleeStatusCode = EFI_SUCCESS;
|
||||
|
||||
if ((PcdGet8(PcdShellSupportLevel) < 1)) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
}
|
||||
|
|
|
@ -341,6 +341,7 @@ ShellCommandRunTftp (
|
|||
}
|
||||
|
||||
RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2);
|
||||
ASSERT(RemoteFilePath != NULL);
|
||||
AsciiRemoteFilePath = AllocatePool (
|
||||
(StrLen (RemoteFilePath) + 1) * sizeof (CHAR8)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue