summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:38:55 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:38:55 +0000
commit5959dd96793971a472f520398c06f123cda80f48 (patch)
tree3d73a04c40183b194087b34ecf8be874ecb711e2 /src/utils
parent4b9735ac3a48e56985c58de4c6f0a0a360c73323 (diff)
downloadlibhubbub-5959dd96793971a472f520398c06f123cda80f48.tar.gz
libhubbub-5959dd96793971a472f520398c06f123cda80f48.tar.bz2
C89
svn path=/trunk/hubbub/; revision=5844
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/string.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/string.c b/src/utils/string.c
index 0a5d44d..e35bec6 100644
--- a/src/utils/string.c
+++ b/src/utils/string.c
@@ -22,10 +22,12 @@
bool hubbub_string_match(const uint8_t *a, size_t a_len,
const uint8_t *b, size_t b_len)
{
+ const uint8_t *s1, *s2;
+
if (a_len != b_len)
return false;
- for (const uint8_t *s1 = a, *s2 = b; b_len > 0; s1++, s2++, b_len--)
+ for (s1 = a, s2 = b; b_len > 0; s1++, s2++, b_len--)
{
if (*s1 != *s2) return false;
}
@@ -45,11 +47,12 @@ bool hubbub_string_match_ci(const uint8_t *a, size_t a_len,
const uint8_t *b, size_t b_len)
{
uint8_t z1, z2;
+ const uint8_t *s1, *s2;
if (a_len != b_len)
return false;
- for (const uint8_t *s1 = a, *s2 = b; b_len > 0; s1++, s2++, b_len--)
+ for (s1 = a, s2 = b; b_len > 0; s1++, s2++, b_len--)
{
z1 = (*s1 & ~0x20);
z2 = (*s2 & ~0x20);