Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2011 20:24:04 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224495 - head/usr.sbin/mfiutil
Message-ID:  <201107292024.p6TKO4vI064682@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Jul 29 20:24:04 2011
New Revision: 224495
URL: http://svn.freebsd.org/changeset/base/224495

Log:
  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.
  
  Reviewed by:	bz
  Approved by:	re (kib)
  MFC after:	3 days

Modified:
  head/usr.sbin/mfiutil/mfi_show.c

Modified: head/usr.sbin/mfiutil/mfi_show.c
==============================================================================
--- head/usr.sbin/mfiutil/mfi_show.c	Fri Jul 29 18:38:31 2011	(r224494)
+++ head/usr.sbin/mfiutil/mfi_show.c	Fri Jul 29 20:24:04 2011	(r224495)
@@ -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?201107292024.p6TKO4vI064682>