diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-02-13 20:52:15 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-02-13 21:22:34 +0100 |
commit | a7c3899c06865c75f8887f33d9043f6e8e780e71 (patch) | |
tree | 1ab6a7c9ad3f707ce5113cdd034ac0c53bc88a7e /tools/perf/util/evsel_fprintf.c | |
parent | perf evsel: Inform how to make a sysctl setting permanent (diff) | |
download | linux-a7c3899c06865c75f8887f33d9043f6e8e780e71.tar.xz linux-a7c3899c06865c75f8887f33d9043f6e8e780e71.zip |
perf symbols: No need to check if sym->name is NULL
As it is an array, so will always evaluate to 'true', as reported by
clang:
builtin-sched.c:2070:19: error: address of array 'sym->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (sym && sym->name) {
~~ ~~~~~^~~~
1 warning generated.
So just ditch all those useless checks.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ydpm927col06paixb775jjx5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel_fprintf.c')
-rw-r--r-- | tools/perf/util/evsel_fprintf.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c index 6b2925542c0a..4ef5184819a0 100644 --- a/tools/perf/util/evsel_fprintf.c +++ b/tools/perf/util/evsel_fprintf.c @@ -168,7 +168,6 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment, if (symbol_conf.bt_stop_list && node->sym && - node->sym->name && strlist__has_entry(symbol_conf.bt_stop_list, node->sym->name)) { break; |