lkml.org 
[lkml]   [2017]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/2] usbip: Fix-format-overflow
From
Date
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

\
 
 \ /
  Last update: 2017-02-22 19:15    [W:0.078 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site