Message ID | 1455921696-3895-9-git-send-email-acme@kernel.org |
---|---|
State | New |
Headers | show |
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index e5583fd4e7bd..72524c755b11 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2110,11 +2110,11 @@ char *parse_events_formats_error_string(char *additional_terms) /* valid terms */ if (additional_terms) { - if (!asprintf(&str, "valid terms: %s,%s", - additional_terms, static_terms)) + if (asprintf(&str, "valid terms: %s,%s", + additional_terms, static_terms) < 0) goto fail; } else { - if (!asprintf(&str, "valid terms: %s", static_terms)) + if (asprintf(&str, "valid terms: %s", static_terms) < 0) goto fail; } return str;