Re: [PATCH v1 1/1] s390: Use string_upper() instead of open coded variant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 11, 2021 at 08:21:15AM +0000, David Laight wrote:
> ...
> > > +	 * This snprintf() call does two things:
> > > +	 * - makes a NUL-terminated copy of the input string
> > > +	 * - pads it with spaces
> > > +	 */
> > > +	snprintf(tmp, sizeof(tmp), "%s        ", name);
> > 
> > I can't say I like code where I have to count spaces in order to
> > verify if the code is actually correct.
> 
> What it wrong with "%-8.8s" ?

There's nothing wrong with it, except lack of imagination on my side ;)
Andy, care to to send a separate patch just for extmem.c?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux