diff options
author | ed <ed@FreeBSD.org> | 2008-11-04 10:58:02 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-11-04 10:58:02 +0000 |
commit | 27790fa127c2ee176eabb84aa31f0d3054d60e89 (patch) | |
tree | caed97d21b26565f61af02fdd79397a5b5cc74a2 /sys/kern/tty_pts.c | |
parent | c51437bbba7ed51ba7ff7ef4fa06af510b8b0ee6 (diff) | |
download | FreeBSD-src-27790fa127c2ee176eabb84aa31f0d3054d60e89.zip FreeBSD-src-27790fa127c2ee176eabb84aa31f0d3054d60e89.tar.gz |
Remove redundant return value tests.
There is no need to test whether the return value is non-zero here. Just
return the error number directly.
Diffstat (limited to 'sys/kern/tty_pts.c')
-rw-r--r-- | sys/kern/tty_pts.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c index d6f10f3..1f87cba 100644 --- a/sys/kern/tty_pts.c +++ b/sys/kern/tty_pts.c @@ -701,13 +701,8 @@ posix_openpt(struct thread *td, struct posix_openpt_args *uap) static int ptmx_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp) { - int error; - error = pts_alloc(fflags & (FREAD|FWRITE), td, fp); - if (error != 0) - return (error); - - return (0); + return (pts_alloc(fflags & (FREAD|FWRITE), td, fp)); } static struct cdevsw ptmx_cdevsw = { |