Skip to content

Commit 434fffa

Browse files
james-c-linaronamhyung
authored andcommitted
perf probe: Fix uninitialized variable
Since the linked fixes: commit, err is returned uninitialized due to the removal of "return 0". Initialize err to fix it. This fixes the following intermittent test failure on release builds: $ perf test "testsuite_probe" ... -- [ FAIL ] -- perf_probe :: test_invalid_options :: mutually exclusive options :: -L foo -V bar (output regexp parsing) Regexp not found: \"Error: switch .+ cannot be used with switch .+\" ... Fixes: 080e47b ("perf probe: Introduce quotation marks support") Tested-by: Namhyung Kim <[email protected]> Reviewed-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent f7e36d0 commit 434fffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/probe-event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
13701370
{
13711371
char *buf = strdup(arg);
13721372
char *p;
1373-
int err;
1373+
int err = 0;
13741374

13751375
if (!buf)
13761376
return -ENOMEM;

0 commit comments

Comments
 (0)