Author: jimharris
Date: Wed Jul 17 23:14:41 2013
New Revision: 253436
URL: http://svnweb.freebsd.org/changeset/base/253436
Log:
Always initialize fd to 0 in open_dev().
Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days
Modified:
head/sbin/nvmecontrol/nvmecontrol.c
Modified: head/sbin/nvmecontrol/nvmecontrol.c
==============================================================================
--- head/sbin/nvmecontrol/nvmecontrol.c Wed Jul 17 23:03:10 2013
(r253435)
+++ head/sbin/nvmecontrol/nvmecontrol.c Wed Jul 17 23:14:41 2013
(r253436)
@@ -166,6 +166,8 @@ open_dev(const char *str, int *fd, int s
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'",
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"