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
This commit is contained in:
John Baldwin 2011-07-29 20:24:04 +00:00
parent ec3e6e77a1
commit c0ca022a34
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224495

View File

@ -533,6 +533,7 @@ show_drives(int ac, char **av)
MFI_DNAME_ES));
printf("\n");
}
error = 0;
error:
free(list);
close(fd);