summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-22 23:31:56 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-22 23:31:56 +0000
commit323f53ff7b98f23e91b6ebb97c82b7e9ff4fa819 (patch)
tree0538feac000d048ae0e3a2bfabc0bf85dff7479e /ShellPkg
parentf680f867cee25f6aad522d7e3960c0046c3bba61 (diff)
downloadedk2-platforms-323f53ff7b98f23e91b6ebb97c82b7e9ff4fa819.tar.xz
Fix linked list loops
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8377 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/BaseShellLib/BaseShellLib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/BaseShellLib/BaseShellLib.c b/ShellPkg/Library/BaseShellLib/BaseShellLib.c
index a43966083f..acc6dffb82 100644
--- a/ShellPkg/Library/BaseShellLib/BaseShellLib.c
+++ b/ShellPkg/Library/BaseShellLib/BaseShellLib.c
@@ -1839,7 +1839,7 @@ ShellCommandLineGetFlag (
//
// enumerate through the list of parametrs
//
- for (Node = GetFirstNode(CheckPackage) ; Node != CheckPackage ; Node = GetNextNode(CheckPackage, Node) ) {
+ for (Node = GetFirstNode(CheckPackage) ; !IsNull (CheckPackage, Node) ; Node = GetNextNode(CheckPackage, Node) ) {
//
// If the Name matches, return TRUE (and there may be NULL name)
//
@@ -1883,7 +1883,7 @@ ShellCommandLineGetValue (
//
// enumerate through the list of parametrs
//
- for (Node = GetFirstNode(CheckPackage) ; Node != NULL ; Node = GetNextNode(CheckPackage, Node) ) {
+ for (Node = GetFirstNode(CheckPackage) ; !IsNull (CheckPackage, Node) ; Node = GetNextNode(CheckPackage, Node) ) {
//
// If the Name matches, return the value (name can be NULL)
//
@@ -1927,7 +1927,7 @@ ShellCommandLineGetRawValue (
//
// enumerate through the list of parametrs
//
- for (Node = GetFirstNode(CheckPackage) ; Node != NULL ; Node = GetNextNode(CheckPackage, Node) ) {
+ for (Node = GetFirstNode(CheckPackage) ; !IsNull (CheckPackage, Node) ; Node = GetNextNode(CheckPackage, Node) ) {
//
// If the position matches, return the value
//