On 04/01/2019 15:55, Andrew Cooper wrote:
> On 04/01/2019 15:32, Jan Beulich wrote:
>>> +    {
>>> +        int res = (*frag - *name);
>> With the result of this being implementation defined (due to plain
>> char's implementation defined - often command line controlled
>> with an implementation defined default - signedness) I wonder if
>> this function can really usefully return "int" rather than "bool".
> My CPUID command line parsing needs this to work properly as int, for
> bisecting across a sorted list.
>
> I'll add an explicit cast to signed char.  I'll also fix out local libc
> functions, which are similarly buggy.

And by this, I actually mean an explicit unsigned cast, having just
cross-checked with the C spec.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to