Commit 0ecf4f0c authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

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: default avatarNamhyung 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 028df767
...@@ -110,7 +110,7 @@ int perf_target__strerror(struct perf_target *target, int errnum, ...@@ -110,7 +110,7 @@ int perf_target__strerror(struct perf_target *target, int errnum,
int idx; int idx;
const char *msg; const char *msg;
BUG_ON(buflen > 0); BUG_ON(buflen == 0);
if (errnum >= 0) { if (errnum >= 0) {
const char *err = strerror_r(errnum, buf, buflen); const char *err = strerror_r(errnum, buf, buflen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment