Convert 0 to false and 1 to true when assigning values to bool
variables. Inspired by commit
3db1cd5c05f35fb43eb134df6f321de4e63141f2.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@@
bool b;
@@
(
-b = 0
+b = false
|
-b = 1
+b = true
)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
struct sk_buff *skb, u8 event)
{
int err = 0;
struct sk_buff *skb, u8 event)
{
int err = 0;
+ bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
event);
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
event);
control->txseq);
chan->buffer_seq = chan->expected_tx_seq;
control->txseq);
chan->buffer_seq = chan->expected_tx_seq;
err = l2cap_reassemble_sdu(chan, skb, control);
if (err)
err = l2cap_reassemble_sdu(chan, skb, control);
if (err)
* current frame is stored for later use.
*/
skb_queue_tail(&chan->srej_q, skb);
* current frame is stored for later use.
*/
skb_queue_tail(&chan->srej_q, skb);
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
{
int err = 0;
u16 txseq = control->txseq;
{
int err = 0;
u16 txseq = control->txseq;
+ bool skb_in_use = false;
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
event);
BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
event);
/* Keep frame for reassembly later */
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
/* Keep frame for reassembly later */
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
* the missing frames.
*/
skb_queue_tail(&chan->srej_q, skb);
* the missing frames.
*/
skb_queue_tail(&chan->srej_q, skb);
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
* SREJ'd frames.
*/
skb_queue_tail(&chan->srej_q, skb);
* SREJ'd frames.
*/
skb_queue_tail(&chan->srej_q, skb);
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
BT_DBG("Queued %p (queue len %d)", skb,
skb_queue_len(&chan->srej_q));