svn commit: r253436 - head/sbin/nvmecontrol
Jim Harris
jimharris at FreeBSD.org
Wed Jul 17 23:14:41 UTC 2013
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'",
More information about the svn-src-all
mailing list