lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c372092aecc243ad880ea9a5bdf7d080@AcuMS.aculab.com>
Date:   Mon, 11 Oct 2021 08:21:15 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Heiko Carstens' <hca@...ux.ibm.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>
Subject: RE: [PATCH v1 1/1] s390: Use string_upper() instead of open coded
 variant

...
> > +	 * 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" ?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ