git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10890
6f19259b-4bc3-4df7-8a09-
765794883524
NewPath = AllocateZeroPool(Size);\r
ASSERT(NewPath != NULL);\r
StrCpy(NewPath, Cwd);\r
NewPath = AllocateZeroPool(Size);\r
ASSERT(NewPath != NULL);\r
StrCpy(NewPath, Cwd);\r
- if (NewPath[StrLen(NewPath)-1] == Path[0] == (CHAR16)L'\\') {\r
+ if ((NewPath[0] == (CHAR16)L'\\') &&\r
+ (NewPath[StrLen(NewPath)-1] == (CHAR16)L'\\')\r
+ ) {\r
((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;\r
}\r
StrCat(NewPath, Path);\r
((CHAR16*)NewPath)[StrLen(NewPath)-1] = CHAR_NULL;\r
}\r
StrCat(NewPath, Path);\r
\r
This must be removed via calling CleanUpShellProtocol().\r
\r
\r
This must be removed via calling CleanUpShellProtocol().\r
\r
- @param[in,out] NewShell The pointer to the pointer to the structure \r
+ @param[in,out] NewShell The pointer to the pointer to the structure\r
to install.\r
\r
@retval EFI_SUCCESS The operation was successful.\r
to install.\r
\r
@retval EFI_SUCCESS The operation was successful.\r
- Opposite of CreatePopulateInstallShellProtocol. \r
+ Opposite of CreatePopulateInstallShellProtocol.\r
\r
Free all memory and restore the system to the state it was in before calling\r
CreatePopulateInstallShellProtocol.\r
\r
Free all memory and restore the system to the state it was in before calling\r
CreatePopulateInstallShellProtocol.\r
//\r
*Statement+=StrLen(Fragment);\r
while (*Statement[0] == L' ') {\r
//\r
*Statement+=StrLen(Fragment);\r
while (*Statement[0] == L' ') {\r
}\r
FreePool(Tester);\r
return (TRUE);\r
}\r
FreePool(Tester);\r
return (TRUE);\r
}\r
return (FALSE);\r
break;\r
}\r
return (FALSE);\r
break;\r
+ default:\r
+ ASSERT(FALSE);\r
+ return (FALSE);\r
}\r
ASSERT(FALSE);\r
return (FALSE);\r
}\r
ASSERT(FALSE);\r
return (FALSE);\r
*Resp = Response;\r
case ShellPromptResponseYes:\r
break;\r
*Resp = Response;\r
case ShellPromptResponseYes:\r
break;\r
+ default:\r
+ return SHELL_ABORTED;\r
)\r
{\r
while(String != NULL && *String != CHAR_NULL) {\r
)\r
{\r
while(String != NULL && *String != CHAR_NULL) {\r
- if (! ( *String >= L'a' && *String <= L'z'\r
- || *String >= L'A' && *String <= L'Z'\r
- || *String >= L'0' && *String <= L'9')\r
+ if (! ((*String >= L'a' && *String <= L'z') ||\r
+ (*String >= L'A' && *String <= L'Z') ||\r
+ (*String >= L'0' && *String <= L'9'))\r
){\r
return (FALSE);\r
}\r
){\r
return (FALSE);\r
}\r