lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 29 Jan 2010 09:39:32 GMT
From:	tip-bot for Thiago Farina <tfransosi@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, paulus@...ba.org, acme@...hat.com,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	tfransosi@...il.com, fweisbec@...il.com, tglx@...utronix.de,
	mhiramat@...hat.com, mingo@...e.hu
Subject: [tip:perf/core] tools/perf/perf.c: Clean up trivial style issues

Commit-ID:  4c574159d03f4d8a136a7adff2d0b1d82cadcb18
Gitweb:     http://git.kernel.org/tip/4c574159d03f4d8a136a7adff2d0b1d82cadcb18
Author:     Thiago Farina <tfransosi@...il.com>
AuthorDate: Wed, 27 Jan 2010 21:05:55 -0200
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 29 Jan 2010 10:36:35 +0100

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@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Masami Hiramatsu <mhiramat@...hat.com>
LKML-Reference: <1264633557-17597-7-git-send-email-acme@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 tools/perf/perf.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 05c861c..109b89b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -48,7 +48,8 @@ int check_pager_config(const char *cmd)
 	return c.val;
 }
 
-static void commit_pager_choice(void) {
+static void commit_pager_choice(void)
+{
 	switch (use_pager) {
 	case 0:
 		setenv("PERF_PAGER", "cat", 1);
@@ -70,7 +71,7 @@ static void set_debugfs_path(void)
 		 "tracing/events");
 }
 
-static int handle_options(const char*** argv, int* argc, int* envchanged)
+static int handle_options(const char ***argv, int *argc, int *envchanged)
 {
 	int handled = 0;
 
@@ -109,7 +110,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
 				*envchanged = 1;
 		} else if (!strcmp(cmd, "--perf-dir")) {
 			if (*argc < 2) {
-				fprintf(stderr, "No directory given for --perf-dir.\n" );
+				fprintf(stderr, "No directory given for --perf-dir.\n");
 				usage(perf_usage_string);
 			}
 			setenv(PERF_DIR_ENVIRONMENT, (*argv)[1], 1);
@@ -124,7 +125,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
 				*envchanged = 1;
 		} else if (!strcmp(cmd, "--work-tree")) {
 			if (*argc < 2) {
-				fprintf(stderr, "No directory given for --work-tree.\n" );
+				fprintf(stderr, "No directory given for --work-tree.\n");
 				usage(perf_usage_string);
 			}
 			setenv(PERF_WORK_TREE_ENVIRONMENT, (*argv)[1], 1);
@@ -168,7 +169,7 @@ static int handle_alias(int *argcp, const char ***argv)
 {
 	int envchanged = 0, ret = 0, saved_errno = errno;
 	int count, option_count;
-	const char** new_argv;
+	const char **new_argv;
 	const char *alias_command;
 	char *alias_string;
 
@@ -210,11 +211,11 @@ static int handle_alias(int *argcp, const char ***argv)
 		if (!strcmp(alias_command, new_argv[0]))
 			die("recursive alias: %s", alias_command);
 
-		new_argv = realloc(new_argv, sizeof(char*) *
+		new_argv = realloc(new_argv, sizeof(char *) *
 				    (count + *argcp + 1));
 		/* insert after command name */
-		memcpy(new_argv + count, *argv + 1, sizeof(char*) * *argcp);
-		new_argv[count+*argcp] = NULL;
+		memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
+		new_argv[count + *argcp] = NULL;
 
 		*argv = new_argv;
 		*argcp += count - 1;
@@ -450,8 +451,8 @@ int main(int argc, const char **argv)
 	setup_path();
 
 	while (1) {
-		static int done_help = 0;
-		static int was_alias = 0;
+		static int done_help;
+		static int was_alias;
 
 		was_alias = run_argv(&argc, &argv);
 		if (errno != ENOENT)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ