Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2008 10:58:02 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184621 - head/sys/kern
Message-ID:  <200811041058.mA4Aw22W093656@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 = {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811041058.mA4Aw22W093656>