On 10.06.2022 11:50, Michal Orzel wrote:
> On 10.06.2022 11:44, Jan Beulich wrote:
>> On 10.06.2022 10:33, Michal Orzel wrote:
>>> All the members of struct tm are defined as integers but the format tags
>>> used in console driver for snprintf wrongly expect unsigned values. Fix
>>> the tags to expect integers.
>>
>> Perhaps do things the other way around - convert field types to unsigned
>> unless negative values can be stored there? This would match our general
>> aim of using unsigned types when only non-negative values can be held in
>> variables / parameters / fields.
>>
> 
> The reason why I did not do this is to be coherent with Linux kernel 
> (include/linux/time.h).
> I believe the time.h code in Xen comes from Linux.
> 
> So if the Linux time.h defines these fields as integers and uses proper %d 
> format specifiers (unlike Xen),
> I think my solution is better.

One can view it that way, sure. I don't. But I also won't nak this change.

Jan

Reply via email to