perf tools: Use single strcmp call instead of two
authorJiri Olsa <jolsa@kernel.org>
Mon, 1 Dec 2014 19:06:22 +0000 (20:06 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Dec 2014 12:14:33 +0000 (09:14 -0300)
There's no need to use 2 strcmp calls, one is enough.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1417460789-13874-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/config.c

index 57ff826f150bfe4db2f89814a1e2a77be54aebfa..c802236b2bfe0e28b3e9bf9faa8d3f57a2498f37 100644 (file)
@@ -522,7 +522,7 @@ static int buildid_dir_command_config(const char *var, const char *value,
        const char *v;
 
        /* same dir for all commands */
-       if (!prefixcmp(var, "buildid.") && !strcmp(var + 8, "dir")) {
+       if (!strcmp(var, "buildid.dir")) {
                v = perf_config_dirname(var, value);
                if (!v)
                        return -1;