Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2011 18:57:59 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r225084 - stable/8/usr.sbin/mfiutil
Message-ID:  <201108221857.p7MIvxPK064336@svn.freebsd.org>

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



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