From 3db1cd5c05f35fb43eb134df6f321de4e63141f2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 19 Dec 2011 13:56:45 +0000 Subject: 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 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 Signed-off-by: David S. Miller --- drivers/net/wimax/i2400m/tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/net/wimax') 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; -- cgit v1.2.3