Always initialize fd to 0 in open_dev().
Sponsored by: Intel Reviewed by: carl MFC after: 3 days
This commit is contained in:
parent
a073133cdf
commit
a648fac32d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253436
@ -166,6 +166,8 @@ open_dev(const char *str, int *fd, int show_error, int exit_on_error)
|
||||
struct stat devstat;
|
||||
char full_path[64];
|
||||
|
||||
*fd = 0;
|
||||
|
||||
if (!strnstr(str, NVME_CTRLR_PREFIX, strlen(NVME_CTRLR_PREFIX))) {
|
||||
if (show_error)
|
||||
warnx("controller/namespace ids must begin with '%s'",
|
||||
|
Loading…
Reference in New Issue
Block a user