[PATCH] perf target: Fix check on buffer size

From: Namhyung Kim
Date: Wed Jul 25 2012 - 21:55:44 EST


From: Namhyung Kim <namhyung.kim@xxxxxxx>

It was a mistake just replace assert to BUG_ON since its condition
should be negated. Fix it.

Cc: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
Cc: Ulrich Drepper <drepper@xxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/