[syslinux:elflink] xfs: Fix binary search in xfs_dir2_leaf_find_entry() function
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue Nov 27 12:57:15 PST 2012
Commit-ID: ece14eb746d5439a91d10bfd803c3db412686cc4
Gitweb: http://www.syslinux.org/commit/ece14eb746d5439a91d10bfd803c3db412686cc4
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Sun, 22 Jul 2012 21:47:55 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Mon, 23 Jul 2012 11:42:31 -0300
xfs: Fix binary search in xfs_dir2_leaf_find_entry() function
The "high" variable wasn't being updated correctly, so the "high" and
"low" variables were containing the same value in the search.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index 75e628e..a8179c5 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -683,7 +683,7 @@ static struct inode *xfs_dir2_leaf_find_entry(const char *dname,
if (hash < hashwant)
low = mid + 1;
else
- high = mid + 1;
+ high = mid - 1;
}
if (hash != hashwant)
More information about the Syslinux-commits
mailing list