perf symbols: No need to check if sym->name is NULL
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 19:52:15 +0000 (16:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 20:22:34 +0000 (17:22 -0300)
commita7c3899c06865c75f8887f33d9043f6e8e780e71
tree1ab6a7c9ad3f707ce5113cdd034ac0c53bc88a7e
parentd6195a6a2c247515d5832debb51c03a74dc3f8f6
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>
tools/perf/builtin-kmem.c
tools/perf/builtin-sched.c
tools/perf/util/evsel_fprintf.c
tools/perf/util/machine.c
tools/perf/util/symbol_fprintf.c