Commit 4c574159d03f4d8a136a7adff2d0b1d82cadcb18
Committed by
Ingo Molnar
1 parent
ae7f6711d6
Exists in
master
and in
39 other branches
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>
Showing 1 changed file with 11 additions and 10 deletions Side-by-side Diff
tools/perf/perf.c
... | ... | @@ -48,7 +48,8 @@ |
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); |
... | ... | @@ -70,7 +71,7 @@ |
70 | 71 | "tracing/events"); |
71 | 72 | } |
72 | 73 | |
73 | -static int handle_options(const char*** argv, int* argc, int* envchanged) | |
74 | +static int handle_options(const char ***argv, int *argc, int *envchanged) | |
74 | 75 | { |
75 | 76 | int handled = 0; |
76 | 77 | |
... | ... | @@ -109,7 +110,7 @@ |
109 | 110 | *envchanged = 1; |
110 | 111 | } else if (!strcmp(cmd, "--perf-dir")) { |
111 | 112 | if (*argc < 2) { |
112 | - fprintf(stderr, "No directory given for --perf-dir.\n" ); | |
113 | + fprintf(stderr, "No directory given for --perf-dir.\n"); | |
113 | 114 | usage(perf_usage_string); |
114 | 115 | } |
115 | 116 | setenv(PERF_DIR_ENVIRONMENT, (*argv)[1], 1); |
... | ... | @@ -124,7 +125,7 @@ |
124 | 125 | *envchanged = 1; |
125 | 126 | } else if (!strcmp(cmd, "--work-tree")) { |
126 | 127 | if (*argc < 2) { |
127 | - fprintf(stderr, "No directory given for --work-tree.\n" ); | |
128 | + fprintf(stderr, "No directory given for --work-tree.\n"); | |
128 | 129 | usage(perf_usage_string); |
129 | 130 | } |
130 | 131 | setenv(PERF_WORK_TREE_ENVIRONMENT, (*argv)[1], 1); |
... | ... | @@ -168,7 +169,7 @@ |
168 | 169 | { |
169 | 170 | int envchanged = 0, ret = 0, saved_errno = errno; |
170 | 171 | int count, option_count; |
171 | - const char** new_argv; | |
172 | + const char **new_argv; | |
172 | 173 | const char *alias_command; |
173 | 174 | char *alias_string; |
174 | 175 | |
175 | 176 | |
... | ... | @@ -210,11 +211,11 @@ |
210 | 211 | if (!strcmp(alias_command, new_argv[0])) |
211 | 212 | die("recursive alias: %s", alias_command); |
212 | 213 | |
213 | - new_argv = realloc(new_argv, sizeof(char*) * | |
214 | + new_argv = realloc(new_argv, sizeof(char *) * | |
214 | 215 | (count + *argcp + 1)); |
215 | 216 | /* insert after command name */ |
216 | - memcpy(new_argv + count, *argv + 1, sizeof(char*) * *argcp); | |
217 | - new_argv[count+*argcp] = NULL; | |
217 | + memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp); | |
218 | + new_argv[count + *argcp] = NULL; | |
218 | 219 | |
219 | 220 | *argv = new_argv; |
220 | 221 | *argcp += count - 1; |
... | ... | @@ -450,8 +451,8 @@ |
450 | 451 | setup_path(); |
451 | 452 | |
452 | 453 | while (1) { |
453 | - static int done_help = 0; | |
454 | - static int was_alias = 0; | |
454 | + static int done_help; | |
455 | + static int was_alias; | |
455 | 456 | |
456 | 457 | was_alias = run_argv(&argc, &argv); |
457 | 458 | if (errno != ENOENT) |