Commit fef096b5 authored by Kurt Hindenburg's avatar Kurt Hindenburg

reduce variable scope

parent acdd32c2
......@@ -79,12 +79,11 @@ struct interval {
static int bisearch(unsigned long ucs, const struct interval* table, int max)
{
int min = 0;
int mid;
if (ucs < table[0].first || ucs > table[max].last)
return 0;
while (max >= min) {
mid = (min + max) / 2;
const int mid = (min + max) / 2;
if (ucs > table[mid].last)
min = mid + 1;
else if (ucs < table[mid].first)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment