From: Blue Swirl <blauwirbel@gmail.com>
To: Andrzej Zaborowski <balrogg@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [RFC, PATCH 1/2] bt-l2cap: fix if statement with empty body, spotted by clang
Date: Sun, 18 Apr 2010 11:51:46 +0300 [thread overview]
Message-ID: <u2nf43fc5581004180151ze489ed21s432b0531a2a1caf5@mail.gmail.com> (raw)
Fix clang error:
CC bt-l2cap.o
/src/qemu/hw/bt-l2cap.c:1000:41: error: if statement has empty body
[-Wempty-body]
/* TODO: Signal an error? */;
This means that l2cap_sframe_in() may now get called.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
hw/bt-l2cap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/bt-l2cap.c b/hw/bt-l2cap.c
index 70d731e..7e2f668 100644
--- a/hw/bt-l2cap.c
+++ b/hw/bt-l2cap.c
@@ -996,10 +996,10 @@ static void l2cap_iframe_in(struct l2cap_chan_s
*ch, uint16_t cid,
l2cap_rexmit_enable(ch, !(hdr->data[0] >> 7));
if (hdr->data[0] & 1) {
- if (len != 4)
- /* TODO: Signal an error? */;
+ if (len != 4) {
+ /* TODO: Signal an error? */
return;
-
+ }
return l2cap_sframe_in(ch, le16_to_cpup((void *) hdr->data));
}
--
1.6.2.4
reply other threads:[~2010-04-18 8:51 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=u2nf43fc5581004180151ze489ed21s432b0531a2a1caf5@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=balrogg@gmail.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).