From d6d798c296ecca71cbd9970868630f12d7868851 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 7 Dec 1998 07:59:20 +0000 Subject: Move stime declaration to main block, otherwise can left uninitialized in rare cases. Found by: Eivind Eklund --- sys/kern/tty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index e84c630..c599717 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.107 1998/11/11 10:03:56 truckman Exp $ + * $Id: tty.c,v 1.108 1998/11/22 09:04:09 bde Exp $ */ /*- @@ -1452,6 +1452,7 @@ ttread(tp, uio, flag) int s, first, error = 0; int has_stime = 0, last_cc = 0; long slp = 0; /* XXX this should be renamed `timo'. */ + struct timeval stime; loop: s = spltty(); @@ -1508,7 +1509,7 @@ loop: if (!ISSET(lflag, ICANON)) { int m = cc[VMIN]; long t = cc[VTIME]; - struct timeval stime, timecopy; + struct timeval timecopy; /* * Check each of the four combinations. -- cgit v1.1