[Top][All Lists]
[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: |
Jes Sorensen |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement |
Date: |
Tue, 18 Jan 2011 17:52:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7 |
On 01/18/11 17:50, Anthony Liguori wrote:
> On 01/18/2011 03:20 AM, Markus Armbruster wrote:
>> address@hidden writes:
>>
>>
>>> From: Jes Sorensen<address@hidden>
>>>
>>> Signed-off-by: Jes Sorensen<address@hidden>
>>> ---
>>> 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)) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>
>> And this improves what? Certainly not clarity.
>>
>> In my opinion, the STRTOSZ_DEFSUFFIX_TB are useless chaff. Chacun à son
>> goût.
>>
>
> Yeah, I have to agree. I'm not of the literals are evil camp.
>
> BTW, a useful change would be to accept both upper and lower case letters.
It already supports both, it's handle in the toupper() call.
Cheers,
Jes
- [Qemu-devel] [PATCH 0/2] strtosz() more cleanups, Jes . Sorensen, 2011/01/17
- [Qemu-devel] [PATCH 1/2] strtosz(): Fix name confusion in use of modf(), Jes . Sorensen, 2011/01/17
- [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Jes . Sorensen, 2011/01/17
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Markus Armbruster, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Jes Sorensen, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Alex Williamson, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Anthony Liguori, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement,
Jes Sorensen <=
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Eric Blake, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Anthony Liguori, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Jes Sorensen, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Anthony Liguori, 2011/01/18
- Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement, Jes Sorensen, 2011/01/19
[Qemu-devel] Re: [PATCH 0/2] strtosz() more cleanups, Alex Williamson, 2011/01/17