Revision: 19424
http://sourceforge.net/p/edk2/code/19424
Author: shenshushi
Date: 2015-12-21 05:09:23 +0000 (Mon, 21 Dec 2015)
Log Message:
-----------
ShellPkg: Refine the code format.
1. Add function header comment.
2. Non-Boolean comparisons should explicitly use a compare operator.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c
Modified: trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c
===================================================================
--- trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c 2015-12-21
01:36:08 UTC (rev 19423)
+++ trunk/edk2/ShellPkg/Application/Shell/ShellManParser.c 2015-12-21
05:09:23 UTC (rev 19424)
@@ -15,8 +15,27 @@
#include "Shell.h"
-CHAR16 EFIAPI InternalShellCharToUpper (IN CHAR16 Char);
+/**
+ Convert a Unicode character to upper case only if
+ it maps to a valid small-case ASCII character.
+ This internal function only deal with Unicode character
+ which maps to a valid small-case ASCII character, i.e.
+ L'a' to L'z'. For other Unicode character, the input character
+ is returned directly.
+
+ @param Char The character to convert.
+
+ @retval LowerCharacter If the Char is with range L'a' to L'z'.
+ @retval Unchanged Otherwise.
+
+**/
+CHAR16
+EFIAPI
+InternalShellCharToUpper (
+ IN CHAR16 Char
+ );
+
/**
Verifies that the filename has .MAN on the end.
@@ -630,7 +649,7 @@
// Do not pass any leading path information that may be present to
IsTitleHeader().
//
Start = StrLen(Command);
- while (Start
+ while ((Start != 0)
&& (*(Command + Start - 1) != L'\\')
&& (*(Command + Start - 1) != L'/')
&& (*(Command + Start - 1) != L':')) {
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits