From owner-svn-src-all@FreeBSD.ORG Tue Nov 4 10:58:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA303106567A; Tue, 4 Nov 2008 10:58:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B877A8FC25; Tue, 4 Nov 2008 10:58:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4Aw2cP093687; Tue, 4 Nov 2008 10:58:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA4Aw22W093656; Tue, 4 Nov 2008 10:58:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811041058.mA4Aw22W093656@svn.freebsd.org> From: Ed Schouten Date: Tue, 4 Nov 2008 10:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184621 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 10:58:02 -0000 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 = {