diff options
author | jhb <jhb@FreeBSD.org> | 2011-07-29 20:24:04 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-07-29 20:24:04 +0000 |
commit | 3b6f1df0b0ea32496af31645202e47a2cde44943 (patch) | |
tree | 9fe311647fae8dbddbef2f7af674a47d2e2b0ac4 /usr.sbin/mfiutil | |
parent | 6f368c5da4693f26968678c14a8043752b701bbe (diff) | |
download | FreeBSD-src-3b6f1df0b0ea32496af31645202e47a2cde44943.zip FreeBSD-src-3b6f1df0b0ea32496af31645202e47a2cde44943.tar.gz |
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
Diffstat (limited to 'usr.sbin/mfiutil')
-rw-r--r-- | usr.sbin/mfiutil/mfi_show.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/mfiutil/mfi_show.c b/usr.sbin/mfiutil/mfi_show.c index d1f0071..ee19e86 100644 --- a/usr.sbin/mfiutil/mfi_show.c +++ b/usr.sbin/mfiutil/mfi_show.c @@ -533,6 +533,7 @@ show_drives(int ac, char **av) MFI_DNAME_ES)); printf("\n"); } + error = 0; error: free(list); close(fd); |