From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: (unknown) Date: Tue, 14 Sep 2010 10:14:45 +0100 Message-ID: <28081.1284455685@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devel-bounces@linuxdriverproject.org Errors-To: devel-bounces@linuxdriverproject.org To: Joe Perches Cc: Amit Kumar Salecha , linux-fbdev@vger.kernel.org, linux-usb@vger.kernel.org, Karsten Keil , James Smart , linux-mips@linux-mips.org, "VMware, Inc." , Bruce Allan , PJ Waskiewicz , Shreyas Bhatewara , alsa-devel@alsa-project.org, Jaroslav Kysela , dhowells@redhat.com, "James E.J. Bottomley" , Paul Mackerras , linux-i2c@vger.kernel.org, Brett Rudley , sparclinux@vger.kernel.org, devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, Florian Tobias Schandinat , e1000-devel@lists.sourceforge.net, Jesse Brandeburg , linux-acpi@vger.kernel.org List-Id: linux-scsi@vger.kernel.org Joe Perches wrote: > Using static const char foo[] = "bar" can save some > code and text space, so change the places where it's possible. That's reasonable. > Also change the places that use > char foo[] = "barX"; > ... > foo[3] = value + '0'; > where X is typically changed > char foo[sizeof("barX")]; > ... > sprintf(foo, "bar%c", value + '0'); You haven't said what this gains. I can see what it may cost, though (depending on how gcc loads foo[]). David