perf tools: Simplify the calculation of variables
Subsystems (4)
PATCH 1/1 perf tools: Simplify the calculation of variables
Fix the following coccicheck warnings:
./tools/perf/util/header.c:3809:18-20: WARNING !A || A && B is equivalent to !A || B.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -1
@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session)* check for the pipe header regardless of source. */ err =perf_header__read_pipe (session); -if (!err || (err &&perf_data__is_pipe (data))) { +if (!err ||perf_data__is_pipe (data)) { data->is_pipe = true;return err; }
Signature · 1 line
1.8.3.1
Quoted 16 lines · Jiapeng Chong
Fix the following coccicheck warnings:
./tools/perf/util/header.c:3809:18-20: WARNING !A || A && B is equivalent to !A || B.
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/header.c +0
-0
tools/perf/util/header.c int perf_session__read_header(struct perf_session *session) · line 3809
Quoted 5 lines
tools/perf/util/header.c +1
-1@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session)* check for the pipe header regardless of source. */ err =perf_header__read_pipe (session); -if (!err || (err &&perf_data__is_pipe (data))) { +if (!err ||perf_data__is_pipe (data)) {
mama mia, thanks
Acked-by Jiri Olsa <[email protected]>
jirka
Quoted 6 lines
tools/perf/util/header.c +0
-0data->is_pipe = true;return err; }Signature · 1 line
1.8.3.1
Em Fri, Feb 05, 2021 at 10:49:15AM +0100, Jiri Olsa escreveu:
Quoted 25 lines · Jiapeng Chong
Quoted 16 lines
Fix the following coccicheck warnings:
./tools/perf/util/header.c:3809:18-20: WARNING !A || A && B is equivalent to !A || B.
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/header.c +0
-0tools/perf/util/header.c int perf_session__read_header(struct perf_session *session) · line 3809
Quoted 5 lines
tools/perf/util/header.c +1
-1@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session)* check for the pipe header regardless of source. */ err =perf_header__read_pipe (session); -if (!err || (err &&perf_data__is_pipe (data))) { +if (!err ||perf_data__is_pipe (data)) {mama mia, thanks
Quoted 1 line
Acked-by Jiri Olsa <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 9 lines
jirka
Quoted 6 lines
tools/perf/util/header.c +0
-0data->is_pipe = true;return err; }Signature · 1 line
1.8.3.1
Signature · 1 line
- Arnaldo