Re: [PATCH 1/2] Fix format overflows

Jonathan Dieter
2017-02-21T17:50:36Z

On Tue, 2017-02-21 at 08:48 +0200, Jonathan Dieter wrote:
> On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote:
> > Hi,
> >
> > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze:
> > > + err("busid length %i >= SYSFS_BUS_ID_SIZE",
> > > size);
>
> Should I also change the error messages to use real values?
> Ex:
> err("busid length %i >= %i", size, sizeof(busid));

On further reflection, I do think changing the error messages to use
sizeof() is cleaner.

If you disagree, please let me know. I don't have a strong feeling
about it one way or the other.

The next revision uses sizeof() in the places you indicated and changes
size to an unsigned int since we're now comparing it to the result of
sizeof().

Thanks again,
Jonathan