qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() st


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement
Date: Tue, 18 Jan 2011 14:39:10 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 01/18/2011 02:36 PM, Jes Sorensen wrote:
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.

toupper() is based on locale so it's not consistent.

Regards,

Anthony Liguori

Cheers,
Jes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]