summaryrefslogtreecommitdiff
path: root/tools/perf/util/target.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-07-26 05:50:10 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-02 01:42:54 +0400
commit0ecf4f0c02b7802de5d1251e03e6eab360f158e1 (patch)
treefacd47d1b40553120ddba146c9cea03cbb35f031 /tools/perf/util/target.c
parent028df76726c5637c6f70a064d94452808ec74f9e (diff)
downloadlinux-0ecf4f0c02b7802de5d1251e03e6eab360f158e1.tar.xz
perf target: Fix check on buffer size
It was a mistake just replace assert to BUG_ON since its condition should be negated. Fix it. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ulrich Drepper <drepper@gmail.com> Link: http://lkml.kernel.org/r/1343267410-7758-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/target.c')
-rw-r--r--tools/perf/util/target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 3f59c496e64c..051eaa68095e 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -110,7 +110,7 @@ int perf_target__strerror(struct perf_target *target, int errnum,
int idx;
const char *msg;
- BUG_ON(buflen > 0);
+ BUG_ON(buflen == 0);
if (errnum >= 0) {
const char *err = strerror_r(errnum, buf, buflen);