From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46851 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfIJ5-0008Ku-NZ for qemu-devel@nongnu.org; Tue, 18 Jan 2011 15:38:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfIIM-0001dY-3C for qemu-devel@nongnu.org; Tue, 18 Jan 2011 15:37:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfIIL-0001dM-ON for qemu-devel@nongnu.org; Tue, 18 Jan 2011 15:36:50 -0500 Message-ID: <4D35F9DC.9040203@redhat.com> Date: Tue, 18 Jan 2011 21:36:44 +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> <4D35C57A.4040206@redhat.com> <4D35F84A.3060806@codemonkey.ws> In-Reply-To: <4D35F84A.3060806@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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, Eric Blake , Markus Armbruster , qemu-devel@nongnu.org On 01/18/11 21:30, Anthony Liguori wrote: > On 01/18/2011 10:53 AM, Eric Blake wrote: >> On 01/18/2011 09:50 AM, Anthony Liguori wrote: >> >>>>> @@ -324,26 +324,26 @@ ssize_t strtosz_suffix(const char *nptr, char >>>>> **end, const char default_suffix) >>>>> } >>>>> } >>>>> switch (toupper(d)) { >>>>> >>> BTW, a useful change would be to accept both upper and lower case >>> letters. >>> >> And it does, via the toupper() added earlier in the series (and which >> has separately been pointed out that using qemu_toupper() might be >> nicer). >> > > Ok. Just taking the different case labels would be nicer IMHO. The old code did that, but I was suggested to do it this way, which I think is cleaner too. Fewer lines of code are easier to read. Cheers, Jes