svn commit: r184621 - head/sys/kern
Ed Schouten
ed at FreeBSD.org
Tue Nov 4 02:58:02 PST 2008
Author: ed
Date: Tue Nov 4 10:58:02 2008
New Revision: 184621
URL: http://svn.freebsd.org/changeset/base/184621
Log:
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.
Modified:
head/sys/kern/tty_pts.c
Modified: head/sys/kern/tty_pts.c
==============================================================================
--- head/sys/kern/tty_pts.c Tue Nov 4 06:34:01 2008 (r184620)
+++ head/sys/kern/tty_pts.c Tue Nov 4 10:58:02 2008 (r184621)
@@ -701,13 +701,8 @@ posix_openpt(struct thread *td, struct p
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 = {
More information about the svn-src-all
mailing list