From owner-svn-src-all@FreeBSD.ORG Mon Aug 22 18:58:00 2011 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 0589B106566B; Mon, 22 Aug 2011 18:58:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E93788FC0A; Mon, 22 Aug 2011 18:57:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MIvxow064338; Mon, 22 Aug 2011 18:57:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7MIvxPK064336; Mon, 22 Aug 2011 18:57:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201108221857.p7MIvxPK064336@svn.freebsd.org> From: John Baldwin Date: Mon, 22 Aug 2011 18:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225084 - stable/8/usr.sbin/mfiutil 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: Mon, 22 Aug 2011 18:58:00 -0000 Author: jhb Date: Mon Aug 22 18:57:59 2011 New Revision: 225084 URL: http://svn.freebsd.org/changeset/base/225084 Log: MFC 224495: Properly initialize an error variable to avoid returning uninitialized data when 'show drives' succeeds, often resulting in a failing exit code even though the command worked fine. Modified: stable/8/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_show.c Mon Aug 22 18:46:23 2011 (r225083) +++ stable/8/usr.sbin/mfiutil/mfi_show.c Mon Aug 22 18:57:59 2011 (r225084) @@ -533,6 +533,7 @@ show_drives(int ac, char **av) MFI_DNAME_ES)); printf("\n"); } + error = 0; error: free(list); close(fd);