Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586369

Re: [PATCH v2 1/2] usbip: Fix-format-overflow

From Jonathan Dieter <jdieter@lesbg.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] usbip: Fix-format-overflow
Date 2017-02-22 19:20 +0100
Message-ID <tdJGa-5HP-17@gated-at.bofh.it> (permalink)
References <tdmTg-5SM-25@gated-at.bofh.it> <tdy81-5ig-5@gated-at.bofh.it> <tdmTg-5SM-27@gated-at.bofh.it> <tdy81-5ig-3@gated-at.bofh.it>
Organization Lebanon Evangelical School for Boys and Girls

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-21 19:00 +0100
  Re: [PATCH v2 1/2] usbip: Fix-format-overflow Krzysztof Opasiak <k.opasiak@samsung.com> - 2017-02-22 07:00 +0100
    [PATCH v3 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100
      [PATCH v3 2/2] usbip: Fix implicit fallthrough warning Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100
      [PATCH v4 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-27 10:00 +0100
        [PATCH v4 2/2] usbip: Fix implicit fallthrough warning Jonathan Dieter <jdieter@lesbg.com> - 2017-02-27 10:00 +0100
    Re: [PATCH v2 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100

csiph-web