From 0dc1481c7072c997e0e63478fe6819577b0c1acc Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 13 Oct 2014 16:26:53 +0200 Subject: init: remove "static" in front of two local stack strings Having the cmd_line and prompt defined as static provides no benefit (since they're not used outside the declaring function) and slightly increases the executable's size. Let's remove "static" here. --- init/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/init.c b/init/init.c index 7819410..e1666b4 100644 --- a/init/init.c +++ b/init/init.c @@ -1224,7 +1224,7 @@ int main(int argc, char **argv, char **envp) { int rebuild; int token; int cmd_input = INPUT_FILE; - static char cmd_line[256]; /* one line of config from the prompt */ + char cmd_line[256]; /* one line of config from the prompt */ struct stat statf; // char *cmdline_arg; char *cfg_file; @@ -1376,7 +1376,7 @@ int main(int argc, char **argv, char **envp) { if (cmd_input == INPUT_KBD) { int len; char *cmd_ptr = cmd_line; - static char prompt[sizeof(cmd_line) + MAX_BRACE_LEVEL + 4]; + char prompt[sizeof(cmd_line) + MAX_BRACE_LEVEL + 4]; char *p = prompt; int lev1, lev2; -- 1.7.12.1