diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 13:56:45 +0000 |
---|---|---|
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 4b9ecb20dee..f20886ade1c 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) { struct device *dev = i2400m_dev(i2400m); struct i2400m_msg_hdr *tx_msg; - bool try_head = 0; + bool try_head = false; BUG_ON(i2400m->tx_msg != NULL); /* * In certain situations, TX queue might have enough space to @@ -580,7 +580,7 @@ try_head: else if (tx_msg == TAIL_FULL) { i2400m_tx_skip_tail(i2400m); d_printf(2, dev, "new TX message: tail full, trying head\n"); - try_head = 1; + try_head = true; goto try_head; } 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, unsigned long flags; size_t padded_len; void *ptr; - bool try_head = 0; + bool try_head = false; unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM || pl_type == I2400M_PT_RESET_COLD; @@ -771,7 +771,7 @@ try_new: d_printf(2, dev, "pl append: tail full\n"); i2400m_tx_close(i2400m); i2400m_tx_skip_tail(i2400m); - try_head = 1; + try_head = true; goto try_new; } else if (ptr == NULL) { /* All full */ result = -ENOSPC; |