From: Domen Puncer <domen@coderock.org>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 2/2] kernel/power/disk.c string fix and if-less iterator
Date: Tue, 21 Jun 2005 11:07:01 +0200 [thread overview]
Message-ID: <20050621090701.GJ3906@nd47.coderock.org> (raw)
In-Reply-To: <20050620221041.GI2222@elf.ucw.cz>
On 21/06/05 00:10 +0200, Pavel Machek wrote:
> Hi!
>
> > The attached patch:
> >
> > o Fixes kernel/power/disk.c string declared as 'char *p = "...";' to be
> > declared as 'char p[] = "...";', as pointed by Jeff Garzik.
>
> ? Why was char *p ... wrong? Because you could not do sizeof() later?
It usualy generates shorter binary, because there's no pointer variable.
Doesn't seem so in this case:
text data bss dec hex filename
before: 2333 389 8 2730 aaa kernel/power/disk.o
after: 2349 389 8 2746 aba kernel/power/disk.o
static const char[] makes it same, so no real gain there either :-(
Sorry for the noise.
Domen
next prev parent reply other threads:[~2005-06-21 9:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-20 21:57 [patch 2/2] kernel/power/disk.c string fix and if-less iterator domen
2005-06-20 22:10 ` Pavel Machek
2005-06-20 23:42 ` Andreas Schwab
2005-06-21 7:36 ` Jörn Engel
2005-06-21 9:07 ` Domen Puncer [this message]
2005-06-21 15:15 ` Horst von Brand
2005-06-21 7:33 ` Jörn Engel
2005-06-21 12:18 ` Mitchell Blank Jr
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=20050621090701.GJ3906@nd47.coderock.org \
--to=domen@coderock.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.