|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH URGENT] common/vsprintf: Fix signed->unsigned error, causing glacial performance.
>>> On 12.11.13 at 18:04, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 12/11/13 16:23, Jan Beulich wrote:
>>>>> On 12.11.13 at 17:10, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>>> --- a/xen/common/vsprintf.c
>>> +++ b/xen/common/vsprintf.c
>>> @@ -239,7 +239,7 @@ static char *number(
>>> static char *string(char *str, char *end, const char *s,
>>> int field_width, int precision, int flags)
>>> {
>>> - unsigned int i, len = strnlen(s, precision);
>>> + int i, len = strnlen(s, precision);
>> ... this just looks _so_ wrong (and whenever I'll come across
>> this again, I'll just be tempted again to adjust it)!
>
> I agree in general, and do err on the side of unsigned whenever
> possible. In this case, I went with exactly what was present before.
And after having committed your fixup, I realized that I should
have made them explicitly "signed" (and going forward we
should try to do so elsewhere when signedness really matters).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |