aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2000-01-21 06:57:52 +0000
committerWarner Losh <imp@FreeBSD.org>2000-01-21 06:57:52 +0000
commit27e2c03a27719dd2b88f5d2fac75aeab3910d439 (patch)
tree287d96086d6c53aadc7be6c9a4b83ffc83bba1b3 /sys/kern/kern_descrip.c
parent08b8e973fed157daba974eb91b4f2ca746401e79 (diff)
downloadsrc-27e2c03a27719dd2b88f5d2fac75aeab3910d439.tar.gz
src-27e2c03a27719dd2b88f5d2fac75aeab3910d439.zip
Fix the style bugs in the style bugs fix. The style bug fix made the
new function inconsistant with the rest of this file. The spelling and grammer fixes were good and remain.
Notes
Notes: svn path=/head/; revision=56363
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 921f08d243e2..1de896e9fffe 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -975,13 +975,15 @@ setugidsafety(p)
fpp = fdp->fd_ofiles;
fdfp = fdp->fd_ofileflags;
- for (i = 0; i <= 2 && i <= fdp->fd_lastfile; i++, fpp++, fdfp++) {
+ for (i = 0; i <= fdp->fd_lastfile; i++, fpp++, fdfp++) {
+ if (i > 2)
+ break;
if (*fpp != NULL && is_unsafe(*fpp)) {
if ((*fdfp & UF_MAPPED) != 0)
- (void)munmapfd(p, i);
- (void)closef(*fpp, p);
+ (void) munmapfd(p, i);
+ (void) closef(*fpp, p);
*fpp = NULL;
- *fdfp = '\0';
+ *fdfp = 0;
if (i < fdp->fd_freefile)
fdp->fd_freefile = i;
}