diff options
author | ache <ache@FreeBSD.org> | 1998-12-07 07:59:20 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-12-07 07:59:20 +0000 |
commit | d6d798c296ecca71cbd9970868630f12d7868851 (patch) | |
tree | 43d859e88a36dc23d0518ef9f5003cf9c669ba21 | |
parent | 566ad3865222cd0e849ef3987803e416b3362c1e (diff) | |
download | FreeBSD-src-d6d798c296ecca71cbd9970868630f12d7868851.zip FreeBSD-src-d6d798c296ecca71cbd9970868630f12d7868851.tar.gz |
Move stime declaration to main block, otherwise can left uninitialized
in rare cases.
Found by: Eivind Eklund <eivind@yes.no>
-rw-r--r-- | sys/kern/tty.c | 5 |
1 files 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. |