diff options
author | steve <steve@FreeBSD.org> | 1998-04-14 00:23:54 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-04-14 00:23:54 +0000 |
commit | e7ef89f59e3c1dadeb48e8bee050fca63d88af33 (patch) | |
tree | 1de12799072b3c06a274b86d53d92213be98b5c8 /usr.bin/leave | |
parent | 8814b5ac8b2d30397c0fa7eeb89943f36ff5f563 (diff) | |
download | FreeBSD-src-e7ef89f59e3c1dadeb48e8bee050fca63d88af33.zip FreeBSD-src-e7ef89f59e3c1dadeb48e8bee050fca63d88af33.tar.gz |
Don't let secs variable wrap if <= 2.
PR: 6290
Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
Diffstat (limited to 'usr.bin/leave')
-rw-r--r-- | usr.bin/leave/leave.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index 1da35da..c392696 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)leave.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: leave.c,v 1.2 1997/07/21 12:04:31 charnier Exp $"; + "$Id: leave.c,v 1.3 1998/01/06 17:27:09 helbig Exp $"; #endif /* not lint */ #include <err.h> @@ -152,7 +152,8 @@ doalarm(secs) exit(0); } sleep((u_int)2); /* let parent print set message */ - secs -= 2; + if (secs >= 2) + secs -= 2; /* * if write fails, we've lost the terminal through someone else |