From: =?UTF-8?q?Manuel=20Sch=C3=B6lling?= Subject: [PATCH] fs: Cleanup string initializations (char[] instead of char *) Date: Sat, 17 May 2014 17:00:18 +0200 Message-ID: <1400338818-2853-1-git-send-email-manuel.schoelling@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Manuel=20Sch=C3=B6lling?= To: viro@zeniv.linux.org.uk Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Initializations like 'char *foo =3D "bar"' will create two variables: a= static string and a pointer (foo) to that static string. Instead 'char foo[] =3D= "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=C3=B6lling --- 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 =3D "disabled"; - const char * flags =3D "flags: "; + const char flags[] =3D "flags: "; =20 if (test_bit(Enabled, &e->flags)) status =3D "enabled"; --=20 1.7.10.4