From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46966 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfEog-0002Fr-SE for qemu-devel@nongnu.org; Tue, 18 Jan 2011 11:55:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfEnQ-0000n2-6g for qemu-devel@nongnu.org; Tue, 18 Jan 2011 11:53:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfEnP-0000mr-VB for qemu-devel@nongnu.org; Tue, 18 Jan 2011 11:52:40 -0500 Message-ID: <4D35C553.9010207@redhat.com> Date: Tue, 18 Jan 2011 17:52:35 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement References: <1295284345-24524-1-git-send-email-Jes.Sorensen@redhat.com> <1295284345-24524-3-git-send-email-Jes.Sorensen@redhat.com> <4D35C4E7.4080704@codemonkey.ws> In-Reply-To: <4D35C4E7.4080704@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kwolf@redhat.com, Alex.Williamson@redhat.com, eblake@redhat.com, Markus Armbruster , qemu-devel@nongnu.org On 01/18/11 17:50, Anthony Liguori wrote: > On 01/18/2011 03:20 AM, Markus Armbruster wrote: >> Jes.Sorensen@redhat.com writes: >> >> =20 >>> From: Jes Sorensen >>> >>> Signed-off-by: Jes Sorensen >>> --- >>> cutils.c | 10 +++++----- >>> 1 files changed, 5 insertions(+), 5 deletions(-) >>> >>> diff --git a/cutils.c b/cutils.c >>> index 328738c..f2c8bbd 100644 >>> --- a/cutils.c >>> +++ b/cutils.c >>> @@ -324,26 +324,26 @@ ssize_t strtosz_suffix(const char *nptr, char >>> **end, const char default_suffix) >>> } >>> } >>> switch (toupper(d)) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> =20 >> And this improves what? Certainly not clarity. >> >> In my opinion, the STRTOSZ_DEFSUFFIX_TB are useless chaff. Chacun =C3= =A0 son >> go=C3=BBt. >> =20 >=20 > Yeah, I have to agree. I'm not of the literals are evil camp. >=20 > BTW, a useful change would be to accept both upper and lower case lette= rs. It already supports both, it's handle in the toupper() call. Cheers, Jes