From owner-svn-src-head@FreeBSD.ORG Sat Dec 5 14:21:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 747E71065672; Sat, 5 Dec 2009 14:21:42 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 635E58FC15; Sat, 5 Dec 2009 14:21:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5ELgJm090072; Sat, 5 Dec 2009 14:21:42 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5ELgQX090070; Sat, 5 Dec 2009 14:21:42 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200912051421.nB5ELgQX090070@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 5 Dec 2009 14:21:42 +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: r200124 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 14:21:42 -0000 Author: pjd Date: Sat Dec 5 14:21:42 2009 New Revision: 200124 URL: http://svn.freebsd.org/changeset/base/200124 Log: Avoid using additional variable for storing an error if we are not going to do anything with it. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Dec 5 13:53:41 2009 (r200123) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Dec 5 14:21:42 2009 (r200124) @@ -293,7 +293,7 @@ vdev_geom_read_guid(struct g_consumer *c uint64_t psize; off_t offset, size; uint64_t guid; - int error, l, len; + int l, len; g_topology_assert_not(); @@ -316,8 +316,7 @@ vdev_geom_read_guid(struct g_consumer *c if ((offset % pp->sectorsize) != 0) continue; - error = vdev_geom_io(cp, BIO_READ, label, offset, size); - if (error != 0) + if (vdev_geom_io(cp, BIO_READ, label, offset, size) != 0) continue; buf = label->vl_vdev_phys.vp_nvlist;