Skip to contentSkip to conversation

: ir250_checker.diff

PATCH New Jean Tourrilhes 1 participant 1 message Jun 11, 2002 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : ir250_checker.diff

ir250_checker.diff :
------------------
o [CORRECT] Fix two bugs found by the Stanford checker in IrCOMM

net/irda/ircomm/ircomm_core.c renamed from net/irda/ircomm/ircomm_core.d0.c +1 -1
diff -u -p linux/net/irda/ircomm/ircomm_core.d0.c linux/net/irda/ircomm/ircomm_core.c
@@ -512,7 +512,7 @@ int ircomm_proc_read(char *buf, char **s
 
 	self = (struct ircomm_cb *) hashbin_get_first(ircomm);
 	while (self != NULL) {
-		ASSERT(self->magic == IRCOMM_MAGIC, return len;);
+		ASSERT(self->magic == IRCOMM_MAGIC, break;);
 
 		if(self->line < 0x10)
 			len += sprintf(buf+len, "ircomm%d", self->line);
net/irda/ircomm/ircomm_tty.c renamed from net/irda/ircomm/ircomm_tty.d0.c +3 -3
diff -u -p linux/net/irda/ircomm/ircomm_tty.d0.c linux/net/irda/ircomm/ircomm_tty.c
@@ -523,6 +523,9 @@ static void ircomm_tty_close(struct tty_
 	if (!tty)
 		return;
 
+	ASSERT(self != NULL, return;);
+	ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
+
 	save_flags(flags); 
 	cli();
 
@@ -533,9 +536,6 @@ static void ircomm_tty_close(struct tty_
 		IRDA_DEBUG(0, __FUNCTION__ "(), returning 1\n");
 		return;
 	}
-
-	ASSERT(self != NULL, return;);
-	ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
 
 	if ((tty->count == 1) && (self->open_count != 1)) {
 		/*