From c617380446ec1228aa4c260b3eca775dbda5896b Mon Sep 17 00:00:00 2001 From: Qiu Shumin Date: Wed, 28 Oct 2015 01:14:34 +0000 Subject: 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 Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18689 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ShellPkg/Library/UefiShellTftpCommandLib') diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c b/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c index 02099febef..831b9c3d02 100644 --- a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c +++ b/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c @@ -341,6 +341,7 @@ ShellCommandRunTftp ( } RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2); + ASSERT(RemoteFilePath != NULL); AsciiRemoteFilePath = AllocatePool ( (StrLen (RemoteFilePath) + 1) * sizeof (CHAR8) ); -- cgit v1.2.3