Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/perf/perf.c: Clean up trivial style issues

Checked with:
./../scripts/checkpatch.pl --terse --file perf.c

perf.c: 51: ERROR: open brace '{' following function declarations go on the next line
perf.c: 73: ERROR: "foo*** bar" should be "foo ***bar"
perf.c:112: ERROR: space prohibited before that close parenthesis ')'
perf.c:127: ERROR: space prohibited before that close parenthesis ')'
perf.c:171: ERROR: "foo** bar" should be "foo **bar"
perf.c:213: ERROR: "(foo*)" should be "(foo *)"
perf.c:216: ERROR: "(foo*)" should be "(foo *)"
perf.c:217: ERROR: space required before that '*' (ctx:OxV)
perf.c:452: ERROR: do not initialise statics to 0 or NULL
perf.c:453: ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <1264633557-17597-7-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Thiago Farina and committed by
Ingo Molnar
4c574159 ae7f6711

+11 -10
+11 -10
tools/perf/perf.c
··· 48 48 return c.val; 49 49 } 50 50 51 - static void commit_pager_choice(void) { 51 + static void commit_pager_choice(void) 52 + { 52 53 switch (use_pager) { 53 54 case 0: 54 55 setenv("PERF_PAGER", "cat", 1); ··· 71 70 "tracing/events"); 72 71 } 73 72 74 - static int handle_options(const char*** argv, int* argc, int* envchanged) 73 + static int handle_options(const char ***argv, int *argc, int *envchanged) 75 74 { 76 75 int handled = 0; 77 76 ··· 110 109 *envchanged = 1; 111 110 } else if (!strcmp(cmd, "--perf-dir")) { 112 111 if (*argc < 2) { 113 - fprintf(stderr, "No directory given for --perf-dir.\n" ); 112 + fprintf(stderr, "No directory given for --perf-dir.\n"); 114 113 usage(perf_usage_string); 115 114 } 116 115 setenv(PERF_DIR_ENVIRONMENT, (*argv)[1], 1); ··· 125 124 *envchanged = 1; 126 125 } else if (!strcmp(cmd, "--work-tree")) { 127 126 if (*argc < 2) { 128 - fprintf(stderr, "No directory given for --work-tree.\n" ); 127 + fprintf(stderr, "No directory given for --work-tree.\n"); 129 128 usage(perf_usage_string); 130 129 } 131 130 setenv(PERF_WORK_TREE_ENVIRONMENT, (*argv)[1], 1); ··· 169 168 { 170 169 int envchanged = 0, ret = 0, saved_errno = errno; 171 170 int count, option_count; 172 - const char** new_argv; 171 + const char **new_argv; 173 172 const char *alias_command; 174 173 char *alias_string; 175 174 ··· 211 210 if (!strcmp(alias_command, new_argv[0])) 212 211 die("recursive alias: %s", alias_command); 213 212 214 - new_argv = realloc(new_argv, sizeof(char*) * 213 + new_argv = realloc(new_argv, sizeof(char *) * 215 214 (count + *argcp + 1)); 216 215 /* insert after command name */ 217 - memcpy(new_argv + count, *argv + 1, sizeof(char*) * *argcp); 218 - new_argv[count+*argcp] = NULL; 216 + memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp); 217 + new_argv[count + *argcp] = NULL; 219 218 220 219 *argv = new_argv; 221 220 *argcp += count - 1; ··· 451 450 setup_path(); 452 451 453 452 while (1) { 454 - static int done_help = 0; 455 - static int was_alias = 0; 453 + static int done_help; 454 + static int was_alias; 456 455 457 456 was_alias = run_argv(&argc, &argv); 458 457 if (errno != ENOENT)