All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] Put the check for NULL before the use of a potentially-null value
@ 2005-01-10 21:52 Frank Sorenson
  2005-01-11  0:28 ` Blaisorblade
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Sorenson @ 2005-01-10 21:52 UTC (permalink / raw)
  To: UML Devel

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

This patch reorders two lines to check a variable for NULL before using 
the variable.

Signed-off-by: Frank Sorenson <frank@tuxrocks.com>

Frank
---------------------------------------------------------------------------
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com

[-- Attachment #2: reorder_null_check --]
[-- Type: text/plain, Size: 483 bytes --]

diff -Naur linux-2.6.10-mm2.orig/arch/um/drivers/line.c linux-2.6.10-mm2/arch/um/drivers/line.c
--- linux-2.6.10-mm2.orig/arch/um/drivers/line.c	2005-01-10 14:35:20.379815252 -0700
+++ linux-2.6.10-mm2/arch/um/drivers/line.c	2005-01-10 14:35:59.786829555 -0700
@@ -593,8 +593,8 @@
 		}
 	}
 	tty  = winch->tty;
-	line = tty->driver_data;
 	if (tty != NULL) {
+		line = tty->driver_data;
 		chan_window_size(&line->chan_list,
 				 &tty->winsize.ws_row, 
 				 &tty->winsize.ws_col);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-11  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 21:52 [uml-devel] [PATCH] Put the check for NULL before the use of a potentially-null value Frank Sorenson
2005-01-11  0:28 ` Blaisorblade
2005-01-11  1:06   ` Frank Sorenson
2005-01-11  9:13   ` Gerd Knorr

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.