qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kwolf@redhat.com, Alex.Williamson@redhat.com,
	Eric Blake <eblake@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement
Date: Wed, 19 Jan 2011 11:03:41 +0100	[thread overview]
Message-ID: <4D36B6FD.8080100@redhat.com> (raw)
In-Reply-To: <4D35FA6E.80309@codemonkey.ws>

On 01/18/11 21:39, Anthony Liguori wrote:
> 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:       
>>>> 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.

If you can show me an actually used locale where the toupper() on
k/m/g/t doesn't result in K/M/G/T then I guess there's a case. Otherwise
I don't really see this being a real point.

I think we are hitting the point where it's about who's taste is better,
and not about the actual code in this discussion.

One point in favor of the patch is this:

Without the patch:
jes@red-feather qemu]$ size cutils.o
   text	   data	    bss	    dec	    hex	filename
   4212	      0	      0	   4212	   1074	cutils.o
With patch:
[jes@red-feather qemu]$ size cutils.o
   text	   data	    bss	    dec	    hex	filename
   4196	      0	      0	   4196	   1064	cutils.o

IMHO it makes the code easier to read, but beyond that there isn't much.
If people are strongly against it, I'll just drop the patch. It's not
worth our time arguing over this level of detail. Otherwise I'd like to
see it applied.

Cheers,
Jes

  reply	other threads:[~2011-01-19 10:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 17:12 [Qemu-devel] [PATCH 0/2] strtosz() more cleanups Jes.Sorensen
2011-01-17 17:12 ` [Qemu-devel] [PATCH 1/2] strtosz(): Fix name confusion in use of modf() Jes.Sorensen
2011-01-17 17:12 ` [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement Jes.Sorensen
2011-01-18  9:20   ` Markus Armbruster
2011-01-18  9:22     ` Jes Sorensen
2011-01-18 15:24     ` Alex Williamson
2011-01-18 16:50     ` Anthony Liguori
2011-01-18 16:52       ` Jes Sorensen
2011-01-18 16:53       ` Eric Blake
2011-01-18 20:30         ` Anthony Liguori
2011-01-18 20:36           ` Jes Sorensen
2011-01-18 20:39             ` Anthony Liguori
2011-01-19 10:03               ` Jes Sorensen [this message]
2011-01-17 17:15 ` [Qemu-devel] Re: [PATCH 0/2] strtosz() more cleanups Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D36B6FD.8080100@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=Alex.Williamson@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).