Revision: 18689
http://sourceforge.net/p/edk2/code/18689
Author: shenshushi
Date: 2015-10-28 01:14:34 +0000 (Wed, 28 Oct 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Application/Shell/ShellProtocol.c
trunk/edk2/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c
Modified: trunk/edk2/ShellPkg/Application/Shell/ShellProtocol.c
===================================================================
--- trunk/edk2/ShellPkg/Application/Shell/ShellProtocol.c 2015-10-28
00:48:43 UTC (rev 18688)
+++ trunk/edk2/ShellPkg/Application/Shell/ShellProtocol.c 2015-10-28
01:14:34 UTC (rev 18689)
@@ -1632,6 +1632,8 @@
EFI_DEVICE_PATH_PROTOCOL *DevPath;
UINTN Size;
EFI_STATUS CalleeStatusCode;
+
+ CalleeStatusCode = EFI_SUCCESS;
if ((PcdGet8(PcdShellSupportLevel) < 1)) {
return (EFI_UNSUPPORTED);
Modified: trunk/edk2/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c 2015-10-28
00:48:43 UTC (rev 18688)
+++ trunk/edk2/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c 2015-10-28
01:14:34 UTC (rev 18689)
@@ -341,6 +341,7 @@
}
RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2);
+ ASSERT(RemoteFilePath != NULL);
AsciiRemoteFilePath = AllocatePool (
(StrLen (RemoteFilePath) + 1) * sizeof (CHAR8)
);
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits