Skip to content

Commit

Permalink
perf target: Fix check on buffer size
Browse files Browse the repository at this point in the history
It was a mistake just replace assert to BUG_ON since its condition
should be negated. Fix it.

Signed-off-by: Namhyung Kim <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ulrich Drepper <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Namhyung Kim authored and acmel committed Aug 1, 2012
1 parent 028df76 commit 0ecf4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0ecf4f0

Please sign in to comment.