diff options
author | bde <bde@FreeBSD.org> | 1996-09-28 11:25:47 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-28 11:25:47 +0000 |
commit | 8600cf9297a369fbc12adcc705334e2a7a93d6d7 (patch) | |
tree | a9ee25f5409c5c0809914bf2cd314ec00904db63 /usr.sbin/ppp/command.c | |
parent | 4cbad1e72637d76fea094775b1250cd4080ae84c (diff) | |
download | FreeBSD-src-8600cf9297a369fbc12adcc705334e2a7a93d6d7.zip FreeBSD-src-8600cf9297a369fbc12adcc705334e2a7a93d6d7.tar.gz |
Moved getdtablesize() out of a loop.
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r-- | usr.sbin/ppp/command.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index c22eff2..da39f6b 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.17 1996/05/11 20:48:22 phk Exp $ + * $Id: command.c,v 1.18 1996/06/09 20:40:58 ache Exp $ * */ #include <sys/types.h> @@ -182,8 +182,9 @@ char **argv; #endif /* HAVE_SHELL_CMD_WITH_ANY_MODE */ if((shpid = fork()) == 0) { - int i; - for(i = 3; i < getdtablesize(); i++) + int dtablesize, i ; + + for (dtablesize = getdtablesize(), i = 3; i < dtablesize; i++) (void)close(i); /* |