]> git.proxmox.com Git - mirror_edk2.git/commitdiff
add fixes for code verification happyness.
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Jun 2011 22:25:46 +0000 (22:25 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Jun 2011 22:25:46 +0000 (22:25 +0000)
signed-off-by: jcarsey
reviewed-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11935 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c

index 1d83f8a24616c4756697c68e071962d96e02e2ed..62c713e58973b473cd2465bdb5cdf5519d40ca43 100644 (file)
@@ -95,6 +95,10 @@ IsValidProfile (
   CONST CHAR16  *TempLocation;\r
 \r
   ProfilesString = ShellGetEnvironmentVariable(L"profiles");\r
+  //\r
+  // According to the Shell spec this is a required environment variable.\r
+  //\r
+  ASSERT(ProfileString != NULL);\r
   TempLocation = StrStr(ProfilesString, String);\r
   if ((TempLocation != NULL) && (*(TempLocation-1) == L';') && (*(TempLocation+StrLen(String)) == L';')) {\r
     return (TRUE);\r
index d09d2ec7a7db56058728c2b9978aa85d0a587c36..8b30ac3122ae5db0a71aaa704d7b40b015c3c9bd 100644 (file)
@@ -254,6 +254,11 @@ ValidateAndCopyFiles(
   ASSERT(FileList != NULL);\r
   ASSERT(DestDir  != NULL);\r
 \r
+  //\r
+  // We already verified that this was present.\r
+  //\r
+  ASSERT(Cwd      != NULL);\r
+\r
   //\r
   // If we are trying to copy multiple files... make sure we got a directory for the target...\r
   //\r