Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2013 23:14:41 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253436 - head/sbin/nvmecontrol
Message-ID:  <201307172314.r6HNEfRQ073142@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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'",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307172314.r6HNEfRQ073142>