: ir250_checker.diff
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
@@ -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
@@ -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 )) {/*