On 07/26/2011 06:41 PM, Richard Henderson wrote:
On 07/26/2011 04:36 AM, Paolo Bonzini wrote:
>  On 07/26/2011 01:26 PM, Avi Kivity wrote:
>>  +    while (i<  view->nr) {
>>  +        j = i + 1;
>>  +        while (j<  view->nr
>>  +&&  can_merge(&view->ranges[j-1],&view->ranges[j])) {
>>  +            view->ranges[i].addr.size += view->ranges[j].addr.size;
>>  +            ++j;
>>  +        }
>>  +        ++i;
>
>  if (j != i) {
>
>>  +        memmove(&view->ranges[i],&view->ranges[j],
>>  +                (view->nr - j) * sizeof(view->ranges[j]));
>>  +        view->nr -= j - i;
>>  +    }
>
>  }

Err, j = i + 1, and increments.  Your conditional will always be true.


If the while loop body is never executed, then i will equal j (both incremented once).

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to