From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 18:45:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52CE2106564A; Tue, 21 Aug 2012 18:45:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D8848FC18; Tue, 21 Aug 2012 18:45:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LIju6I085428; Tue, 21 Aug 2012 18:45:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LIju1F085425; Tue, 21 Aug 2012 18:45:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211845.q7LIju1F085425@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 18:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239516 - stable/9/sbin/camcontrol X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 18:45:56 -0000 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;