Skip to contentSkip to conversation

moxa: fix sparse warnings

PATCH In review Harvey Harrison 1 participant 1 message Feb 20, 2008 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 moxa: fix sparse warnings

drivers/char/moxa.c:873:26: warning: Using plain integer as NULL pointer drivers/char/moxa.c:2037:49: warning: Using plain integer as NULL pointer

---
 drivers/char/moxa.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/moxa.c +2 -2
index 75c957f..d7e4aa7 100644
@@ -870,7 +870,7 @@ static void moxa_poll(unsigned long ignored)
 			if (!(ch->statusflags & THROTTLE) &&
 			    (MoxaPortRxQueue(ch->port) > 0))
 				moxa_receive_data(ch);
-			if ((tp = ch->tty) == 0)
+			if ((tp = ch->tty) == NULL)
 				continue;
 			if (ch->statusflags & LOWWAIT) {
 				if (MoxaPortTxQueue(ch->port) <= WAKEUP_CHARS) {
@@ -2034,7 +2034,7 @@ static int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud)
 	tcflag_t cflag;
 	tcflag_t mode = 0;
 
-	if (moxa_ports[port].chkPort == 0 || termio == 0)
+	if (moxa_ports[port].chkPort == 0 || termio == NULL)
 		return (-1);
 	ofsAddr = moxa_ports[port].tableAddr;
 	cflag = termio->c_cflag;	/* termio->c_cflag */
Signature · 1 line
1.5.4.2.200.g99e75