diff options
Diffstat (limited to 'tools/perf/ui/browsers/scripts.c')
-rw-r--r-- | tools/perf/ui/browsers/scripts.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c index 04f9aff5621e..50e0c03171f2 100644 --- a/tools/perf/ui/browsers/scripts.c +++ b/tools/perf/ui/browsers/scripts.c | |||
@@ -1,5 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include "../../builtin.h" | ||
2 | #include "../../util/sort.h" | 3 | #include "../../util/sort.h" |
4 | #include "../../util/util.h" | ||
3 | #include "../../util/hist.h" | 5 | #include "../../util/hist.h" |
4 | #include "../../util/debug.h" | 6 | #include "../../util/debug.h" |
5 | #include "../../util/symbol.h" | 7 | #include "../../util/symbol.h" |
@@ -131,8 +133,10 @@ static int list_scripts(char *script_name, bool *custom, | |||
131 | int key = ui_browser__input_window("perf script command", | 133 | int key = ui_browser__input_window("perf script command", |
132 | "Enter perf script command line (without perf script prefix)", | 134 | "Enter perf script command line (without perf script prefix)", |
133 | script_args, "", 0); | 135 | script_args, "", 0); |
134 | if (key != K_ENTER) | 136 | if (key != K_ENTER) { |
135 | return -1; | 137 | ret = -1; |
138 | goto out; | ||
139 | } | ||
136 | sprintf(script_name, "%s script %s", perf, script_args); | 140 | sprintf(script_name, "%s script %s", perf, script_args); |
137 | } else if (choice < num + max_std) { | 141 | } else if (choice < num + max_std) { |
138 | strcpy(script_name, paths[choice]); | 142 | strcpy(script_name, paths[choice]); |