diff options
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel1CommandsLib/If.c | 5 | ||||
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c | 2 | ||||
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c index 3376329622..3a154a2625 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c @@ -62,7 +62,7 @@ IsNextFragment ( //
*Statement+=StrLen(Fragment);
while (*Statement[0] == L' ') {
- *Statement++;
+ Statement++;
}
FreePool(Tester);
return (TRUE);
@@ -302,6 +302,9 @@ TestOperation ( }
return (FALSE);
break;
+ default:
+ ASSERT(FALSE);
+ return (FALSE);
}
ASSERT(FALSE);
return (FALSE);
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index e35bf18824..94161cfecb 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c @@ -111,6 +111,8 @@ CopySingleFile( *Resp = Response;
case ShellPromptResponseYes:
break;
+ default:
+ return SHELL_ABORTED;
}
}
}
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c index 5d6a200c19..c4c8c87ff4 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c @@ -790,9 +790,9 @@ IsNumberLetterOnly( )
{
while(String != NULL && *String != CHAR_NULL) {
- if (! ( *String >= L'a' && *String <= L'z'
- || *String >= L'A' && *String <= L'Z'
- || *String >= L'0' && *String <= L'9')
+ if (! ((*String >= L'a' && *String <= L'z') ||
+ (*String >= L'A' && *String <= L'Z') ||
+ (*String >= L'0' && *String <= L'9'))
){
return (FALSE);
}
|