summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-24 09:51:47 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2012-03-24 09:51:47 +0000
commit1adc093a02f65e1742c5e8967cb5439eda7d1264 (patch)
tree538410c6bc416e1688c6270d725a7b70c925119e /src/utils
parent5366ee583b0571dc39acb4af86103c951a9175c0 (diff)
downloadlibdom-1adc093a02f65e1742c5e8967cb5439eda7d1264.tar.gz
libdom-1adc093a02f65e1742c5e8967cb5439eda7d1264.tar.bz2
C89.
svn path=/trunk/libdom/; revision=13583
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/character_valid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/character_valid.c b/src/utils/character_valid.c
index 2251075..e966ec1 100644
--- a/src/utils/character_valid.c
+++ b/src/utils/character_valid.c
@@ -142,10 +142,12 @@ static bool binary_search(unsigned int ch, int left, int right,
bool binary_search(unsigned int ch, int left, int right,
const struct xml_char_range *range)
{
+ int mid;
+
if (left > right)
return false;
- int mid = (left + right) / 2;
+ mid = (left + right) / 2;
if (ch >= range[mid].start && ch <= range[mid].end)
return true;