Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 18:45:56 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r239516 - stable/9/sbin/camcontrol
Message-ID:  <201208211845.q7LIju1F085425@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Aug 21 18:45:55 2012
New Revision: 239516
URL: http://svn.freebsd.org/changeset/base/239516

Log:
  MFC r239059:
  
  In sbin/camcontrol/camcontrol.c, function smpcmd(), initialize the
  'error' variable to zero, to avoid returning garbage in several cases.

Modified:
  stable/9/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/9/sbin/camcontrol/   (props changed)

Modified: stable/9/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/9/sbin/camcontrol/camcontrol.c	Tue Aug 21 18:41:38 2012	(r239515)
+++ stable/9/sbin/camcontrol/camcontrol.c	Tue Aug 21 18:45:55 2012	(r239516)
@@ -4463,7 +4463,7 @@ static int
 smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt,
        int retry_count, int timeout)
 {
-	int c, error;
+	int c, error = 0;
 	union ccb *ccb;
 	uint8_t *smp_request = NULL, *smp_response = NULL;
 	int request_size = 0, response_size = 0;



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