From 27e2c03a27719dd2b88f5d2fac75aeab3910d439 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 21 Jan 2000 06:57:52 +0000 Subject: [PATCH] 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. --- sys/kern/kern_descrip.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 921f08d243e..1de896e9fff 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; }