Re: [PATCH v2 1/2] usbip: Fix-format-overflow
From: Jonathan Dieter
Date: Wed Feb 22 2017 - 13:14:55 EST
On Wed, 2017-02-22 at 06:49 +0100, Krzysztof Opasiak wrote:
> Hi,
>
> W dniu 2017-02-21 o 18:57, Jonathan Dieter pisze:
<snip>
> > Â char busid[SYSFS_BUS_ID_SIZE];
> > + unsigned int size;
>
> I'm not really convinced to use unsigned here. snprintf() is declared
> toÂ
> return signed integer so we should assume that some of itsÂ
> implementation may return negative error code. Any rationale to thisÂ
> instead of just doing a cast for comparsion but signed value to print
> error?
No, you're absolutely right. I've fixed this and am sending the next
revision now.
Jonathan