From 4338ee87ff7bb63cb40c6bd5ad74a146899e3288 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 12 Jul 2009 12:51:54 +0000 Subject: Hand off comparison to utility string comparisons. svn path=/trunk/hubbub/; revision=8473 --- src/treebuilder/initial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/treebuilder/initial.c b/src/treebuilder/initial.c index f26d13f..9c2a6aa 100644 --- a/src/treebuilder/initial.c +++ b/src/treebuilder/initial.c @@ -94,7 +94,8 @@ static bool starts_with(const uint8_t *a, size_t a_len, const uint8_t *b, if (a_len < b_len) return false; - return strncasecmp((const char *) a, (const char *) b, b_len) == 0; + /* Now perform an insensitive comparison on the prefix */ + return hubbub_string_match_ci(a, b_len, b, b_len); } -- cgit v1.2.3