summaryrefslogtreecommitdiff
path: root/src/treebuilder/initial.c
diff options
context:
space:
mode:
authorFrançois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:35:33 +0000
committerFrançois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:35:33 +0000
commit4b9735ac3a48e56985c58de4c6f0a0a360c73323 (patch)
treefcd9426d6cddc319b024e4211fd3274e7cfa0f79 /src/treebuilder/initial.c
parent8b89c771568230fad877f86c2b13cba562137ac2 (diff)
downloadlibhubbub-4b9735ac3a48e56985c58de4c6f0a0a360c73323.tar.gz
libhubbub-4b9735ac3a48e56985c58de4c6f0a0a360c73323.tar.bz2
C89
svn path=/trunk/hubbub/; revision=5843
Diffstat (limited to 'src/treebuilder/initial.c')
-rw-r--r--src/treebuilder/initial.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/treebuilder/initial.c b/src/treebuilder/initial.c
index 0ea071a..5e274c7 100644
--- a/src/treebuilder/initial.c
+++ b/src/treebuilder/initial.c
@@ -92,11 +92,12 @@ static bool starts_with(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);
@@ -242,6 +243,7 @@ hubbub_error handle_initial(hubbub_treebuilder *treebuilder, const hubbub_token
{
int success;
void *doctype, *appended;
+ const hubbub_doctype *cdoc;
/** \todo parse error */
@@ -271,7 +273,7 @@ hubbub_error handle_initial(hubbub_treebuilder *treebuilder, const hubbub_token
treebuilder->tree_handler->unref_node(
treebuilder->tree_handler->ctx, doctype);
- const hubbub_doctype *cdoc = &token->data.doctype;
+ cdoc = &token->data.doctype;
/* Work out whether we need quirks mode or not */
if (cdoc->force_quirks == true ||