Re: [PATCH] time: Fix signedness bug in sysfs_get_uname() and its callers

2013-10-18 Thread Patrick Palka
On Fri, Oct 18, 2013 at 8:16 PM, John Stultz wrote: > On 10/11/2013 10:11 AM, Patrick Palka wrote: >> sysfs_get_uname() is erroneously declared as returning size_t even >> though it may return a negative value, specifically -EINVAL. Its >> callers then check whether its return value is less than

Re: [PATCH] time: Fix signedness bug in sysfs_get_uname() and its callers

2013-10-18 Thread John Stultz
On 10/11/2013 10:11 AM, Patrick Palka wrote: > sysfs_get_uname() is erroneously declared as returning size_t even > though it may return a negative value, specifically -EINVAL. Its > callers then check whether its return value is less than zero and indeed > that is never the case for size_t. > > T

[PATCH] time: Fix signedness bug in sysfs_get_uname() and its callers

2013-10-11 Thread Patrick Palka
sysfs_get_uname() is erroneously declared as returning size_t even though it may return a negative value, specifically -EINVAL. Its callers then check whether its return value is less than zero and indeed that is never the case for size_t. This patch changes sysfs_get_uname() to return ssize_t an