patch-2.1.131 linux/drivers/char/joystick/joy-console.c

Next file: linux/drivers/char/joystick/joy-db9.c
Previous file: linux/drivers/char/joystick/joy-assasin.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.130/linux/drivers/char/joystick/joy-console.c linux/drivers/char/joystick/joy-console.c
@@ -373,9 +373,9 @@
 	struct js_console_info *info;
 	int i;
 
-	while (js_console_port) {
+	while (js_console_port != NULL) {
 		for (i = 0; i < js_console_port->ndevs; i++)
-			if (js_console_port->devs[i])
+			if (js_console_port->devs[i] != NULL)
 				js_unregister_device(js_console_port->devs[i]);
 		info = js_console_port->info;
 #ifdef USE_PARPORT
@@ -428,11 +428,11 @@
 		struct parport *pp;
 
 		if (config[0] > 0x10)
-			for (pp=parport_enumerate(); pp && (pp->base!=config[0]); pp=pp->next);
+			for (pp=parport_enumerate(); pp != NULL && (pp->base!=config[0]); pp=pp->next);
 		else
-			for (pp=parport_enumerate(); pp && (config[0]>0); pp=pp->next) config[0]--;
+			for (pp=parport_enumerate(); pp != NULL && (config[0]>0); pp=pp->next) config[0]--;
 
-		if (!pp) {
+		if (pp == NULL) {
 			printk(KERN_ERR "joy-console: no such parport\n");
 			return port;
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov