diff options
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r-- | tools/perf/builtin-c2c.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 14f787c67140..fbbed434014f 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -44,6 +44,7 @@ #include "../perf.h" #include "pmu.h" #include "pmu-hybrid.h" +#include "string2.h" struct c2c_hists { struct hists hists; @@ -3025,9 +3026,9 @@ int cmd_c2c(int argc, const char **argv) if (!argc) usage_with_options(c2c_usage, c2c_options); - if (!strncmp(argv[0], "rec", 3)) { + if (strlen(argv[0]) > 2 && strstarts("record", argv[0])) { return perf_c2c__record(argc, argv); - } else if (!strncmp(argv[0], "rep", 3)) { + } else if (strlen(argv[0]) > 2 && strstarts("report", argv[0])) { return perf_c2c__report(argc, argv); } else { usage_with_options(c2c_usage, c2c_options); |