From: davidcomponentone@gmail.com
To: davidcomponentone@gmail.com
Cc: linux-kernel@vger.kernel.org, Yang Guang <yang.guang5@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] tools lib traceevent: fix boolreturn.cocci warning
Date: Fri, 14 Jan 2022 08:10:08 +0800 [thread overview]
Message-ID: <13fadc627ba2eaa442b9cd7d2e22fae328465e7a.1642065110.git.davidcomponentone@gmail.com> (raw)
From: Yang Guang <yang.guang5@zte.com.cn>
The coccinelle report
./tools/lib/traceevent/event-parse-api.c:289:8-9:
WARNING: return of 0/1 in function 'tep_is_local_bigendian'
with return type bool.
Return statements in functions returning bool should use true/false
instead of 1/0.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
---
tools/lib/traceevent/event-parse-api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse-api.c b/tools/lib/traceevent/event-parse-api.c
index f8361e45d446..f153476f39c1 100644
--- a/tools/lib/traceevent/event-parse-api.c
+++ b/tools/lib/traceevent/event-parse-api.c
@@ -286,7 +286,7 @@ bool tep_is_local_bigendian(struct tep_handle *tep)
{
if (tep)
return (tep->host_bigendian == TEP_BIG_ENDIAN);
- return 0;
+ return false;
}
/**
--
2.30.2
reply other threads:[~2022-01-14 0:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13fadc627ba2eaa442b9cd7d2e22fae328465e7a.1642065110.git.davidcomponentone@gmail.com \
--to=davidcomponentone@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yang.guang5@zte.com.cn \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome