diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 08:56:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-19 22:27:29 -0500 |
commit | 3db1cd5c05f35fb43eb134df6f321de4e63141f2 (patch) | |
tree | 960039f3f4f0a524b37e94434624da154859bc64 /drivers/net/wimax | |
parent | a8e510f682fe6d7671c11887e07c55f86caaf3c1 (diff) |
net: fix assignment of 0/1 to bool variables.
DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.
Joe Perches <joe@perches.com> gave me the spatch script:
@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true
I merely installed coccinelle, read the documentation and took credit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r-- | drivers/net/wimax/i2400m/tx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c index 4b9ecb20deec..f20886ade1cc 100644 --- a/drivers/net/wimax/i2400m/tx.c +++ b/drivers/net/wimax/i2400m/tx.c | |||
@@ -562,7 +562,7 @@ void i2400m_tx_new(struct i2400m *i2400m) | |||
562 | { | 562 | { |
563 | struct device *dev = i2400m_dev(i2400m); | 563 | struct device *dev = i2400m_dev(i2400m); |
564 | struct i2400m_msg_hdr *tx_msg; | 564 | struct i2400m_msg_hdr *tx_msg; |
565 | bool try_head = 0; | 565 | bool try_head = false; |
566 | BUG_ON(i2400m->tx_msg != NULL); | 566 | BUG_ON(i2400m->tx_msg != NULL); |
567 | /* | 567 | /* |
568 | * In certain situations, TX queue might have enough space to | 568 | * In certain situations, TX queue might have enough space to |
@@ -580,7 +580,7 @@ try_head: | |||
580 | else if (tx_msg == TAIL_FULL) { | 580 | else if (tx_msg == TAIL_FULL) { |
581 | i2400m_tx_skip_tail(i2400m); | 581 | i2400m_tx_skip_tail(i2400m); |
582 | d_printf(2, dev, "new TX message: tail full, trying head\n"); | 582 | d_printf(2, dev, "new TX message: tail full, trying head\n"); |
583 | try_head = 1; | 583 | try_head = true; |
584 | goto try_head; | 584 | goto try_head; |
585 | } | 585 | } |
586 | memset(tx_msg, 0, I2400M_TX_PLD_SIZE); | 586 | memset(tx_msg, 0, I2400M_TX_PLD_SIZE); |
@@ -720,7 +720,7 @@ int i2400m_tx(struct i2400m *i2400m, const void *buf, size_t buf_len, | |||
720 | unsigned long flags; | 720 | unsigned long flags; |
721 | size_t padded_len; | 721 | size_t padded_len; |
722 | void *ptr; | 722 | void *ptr; |
723 | bool try_head = 0; | 723 | bool try_head = false; |
724 | unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM | 724 | unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM |
725 | || pl_type == I2400M_PT_RESET_COLD; | 725 | || pl_type == I2400M_PT_RESET_COLD; |
726 | 726 | ||
@@ -771,7 +771,7 @@ try_new: | |||
771 | d_printf(2, dev, "pl append: tail full\n"); | 771 | d_printf(2, dev, "pl append: tail full\n"); |
772 | i2400m_tx_close(i2400m); | 772 | i2400m_tx_close(i2400m); |
773 | i2400m_tx_skip_tail(i2400m); | 773 | i2400m_tx_skip_tail(i2400m); |
774 | try_head = 1; | 774 | try_head = true; |
775 | goto try_new; | 775 | goto try_new; |
776 | } else if (ptr == NULL) { /* All full */ | 776 | } else if (ptr == NULL) { /* All full */ |
777 | result = -ENOSPC; | 777 | result = -ENOSPC; |