From fe8ec3dd93dacdf2bbe983d48453d92ae3b1b314 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Wed, 4 Feb 2015 16:46:59 +0000 Subject: ShellPkg: Revert 16720 and 16734. I will submit a new patch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16758 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ShellPkg') diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 52b6834ab9..dcf48d3223 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -211,21 +211,20 @@ ContainsSplit( SecondQuote = NULL; TempSpot = FindFirstCharacter(CmdLine, L"|", L'^'); - if (FirstQuote == NULL || - *FirstQuote == CHAR_NULL || - TempSpot == NULL || - *TempSpot == CHAR_NULL || + if (FirstQuote == NULL || + TempSpot == NULL || + TempSpot == CHAR_NULL || FirstQuote > TempSpot ) { return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL)); } while ((TempSpot != NULL) && (*TempSpot != CHAR_NULL)) { - if (FirstQuote == NULL || *FirstQuote == CHAR_NULL || FirstQuote > TempSpot) { + if (FirstQuote == NULL || FirstQuote > TempSpot) { break; } SecondQuote = FindNextInstance (FirstQuote + 1, L"\"", TRUE); - if (SecondQuote == NULL || *SecondQuote == CHAR_NULL) { + if (SecondQuote == NULL) { break; } if (SecondQuote < TempSpot) { @@ -1375,7 +1374,7 @@ StripUnreplacedEnvironmentVariables( continue; } - if (FirstQuote == NULL || *FirstQuote == CHAR_NULL || SecondPercent < FirstQuote) { + if (FirstQuote == NULL || SecondPercent < FirstQuote) { if (IsValidEnvironmentVariableName(FirstPercent, SecondPercent)) { // // We need to remove from FirstPercent to SecondPercent -- cgit v1.2.3