perf tests record: No need to test an array against NULL
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 20:04:05 +0000 (17:04 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 Feb 2017 20:22:34 +0000 (17:22 -0300)
commit9ef6839bcce7ca944c1ace4a7247cf13ca92a28f
treefc426aa211d391094f890ee82604403b4743a0fa
parenta7c3899c06865c75f8887f33d9043f6e8e780e71
perf tests record: No need to test an array against NULL

It will always evaluate to 'true', as clang warns:

    CC       /tmp/build/perf/tests/perf-record.o
    CC       /tmp/build/perf/tests/evsel-roundtrip-name.o
  tests/perf-record.c:69:24: error: comparison of array 'argv' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
          if (evlist == NULL || argv == NULL) {
                                ^~~~    ~~~~
  1 error generated.

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-o4977g6p9b3peak9ct6ef48q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/perf-record.c