diff options
author | pjd <pjd@FreeBSD.org> | 2012-06-13 21:11:58 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-06-13 21:11:58 +0000 |
commit | c745de62f2593dbd1c3f9d9f36cd3f0ec541b8b8 (patch) | |
tree | 6c5a53d683d212de5771772817758f7cc3f41a4a /sys/kern/vfs_syscalls.c | |
parent | 54a86dc320222d1f20d4f9dece83d2c15fa93b48 (diff) | |
download | FreeBSD-src-c745de62f2593dbd1c3f9d9f36cd3f0ec541b8b8.zip FreeBSD-src-c745de62f2593dbd1c3f9d9f36cd3f0ec541b8b8.tar.gz |
Style.
MFC after: 1 month
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 04273e2..d70e49b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1111,13 +1111,14 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, if (flags & O_EXEC) { if (flags & O_ACCMODE) return (EINVAL); - } else if ((flags & O_ACCMODE) == O_ACCMODE) + } else if ((flags & O_ACCMODE) == O_ACCMODE) { return (EINVAL); - else + } else flags = FFLAGS(flags); + } /* - * allocate the file descriptor, but don't install a descriptor yet + * Allocate the file descriptor, but don't install a descriptor yet. */ error = falloc_noinstall(td, &nfp); if (error) @@ -1141,7 +1142,7 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, goto success; /* - * handle special fdopen() case. bleh. dupfdopen() is + * Handle special fdopen() case. bleh. dupfdopen() is * responsible for dropping the old contents of ofiles[indx] * if it succeeds. * @@ -1149,9 +1150,9 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, * understand exactly what would happen, and we don't think * that it ever should. */ - if ((nd.ni_strictrelative == 0) && + if (nd.ni_strictrelative == 0 && (error == ENODEV || error == ENXIO) && - (td->td_dupfd >= 0)) { + td->td_dupfd >= 0) { /* XXX from fdopen */ error_open = error; if ((error = finstall(td, fp, &indx, flags)) != 0) @@ -1206,7 +1207,7 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, if ((flags & FNONBLOCK) == 0) type |= F_WAIT; if ((error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, - type)) != 0) + type)) != 0) goto bad; atomic_set_int(&fp->f_flag, FHASLOCK); } |