Commit-ID:  0ecf4f0c02b7802de5d1251e03e6eab360f158e1
Gitweb:     http://git.kernel.org/tip/0ecf4f0c02b7802de5d1251e03e6eab360f158e1
Author:     Namhyung Kim <namhyung....@lge.com>
AuthorDate: Thu, 26 Jul 2012 10:50:10 +0900
Committer:  Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate: Wed, 1 Aug 2012 18:42:54 -0300

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 <namhy...@kernel.org>
Cc: "Kirill A. Shutemov" <kir...@shutemov.name>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Kirill A. Shutemov <kir...@shutemov.name>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Ulrich Drepper <drep...@gmail.com>
Link: 
http://lkml.kernel.org/r/1343267410-7758-1-git-send-email-namhy...@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/util/target.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 3f59c49..051eaa6 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to