linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: Cleanup string initializations (char[] instead of char *)
@ 2014-05-17 15:00 Manuel Schölling
  2014-05-17 15:44 ` Mateusz Guzik
  2014-05-17 16:53 ` Al Viro
  0 siblings, 2 replies; 7+ messages in thread
From: Manuel Schölling @ 2014-05-17 15:00 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Manuel Schölling

Initializations like 'char *foo = "bar"' will create two variables: a static
string and a pointer (foo) to that static string. Instead 'char foo[] = "bar"'
will declare a single variable and will end up in shorter
assembly (according to Jeff Garzik on the KernelJanitor's TODO list).

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
---
 fs/binfmt_misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index b605003..2a10529 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -419,7 +419,7 @@ static void entry_status(Node *e, char *page)
 {
 	char *dp;
 	char *status = "disabled";
-	const char * flags = "flags: ";
+	const char flags[] = "flags: ";
 
 	if (test_bit(Enabled, &e->flags))
 		status = "enabled";
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-19  1:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 15:00 [PATCH] fs: Cleanup string initializations (char[] instead of char *) Manuel Schölling
2014-05-17 15:44 ` Mateusz Guzik
2014-05-17 17:21   ` Al Viro
2014-05-17 17:58     ` Mateusz Guzik
2014-05-17 16:53 ` Al Viro
2014-05-18 10:01   ` Manuel Schoelling
2014-05-19  1:51   ` Kevin Easton

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).