Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2011 22:01:34 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228542 - head/sbin/hastd
Message-ID:  <201112152201.pBFM1YW1072477@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Thu Dec 15 22:01:34 2011
New Revision: 228542
URL: http://svn.freebsd.org/changeset/base/228542

Log:
  Remove redundant setting of the error variable.
  
  Found by:	Clang Static Analyzer
  MFC after:	1 week

Modified:
  head/sbin/hastd/control.c

Modified: head/sbin/hastd/control.c
==============================================================================
--- head/sbin/hastd/control.c	Thu Dec 15 21:06:37 2011	(r228541)
+++ head/sbin/hastd/control.c	Thu Dec 15 22:01:34 2011	(r228542)
@@ -312,7 +312,6 @@ control_handle(struct hastd_config *cfg)
 	cmd = nv_get_uint8(nvin, "cmd");
 	if (cmd == 0) {
 		pjdlog_error("Control header is missing 'cmd' field.");
-		error = EHAST_INVALID;
 		goto close;
 	}
 
@@ -320,7 +319,6 @@ control_handle(struct hastd_config *cfg)
 	nvout = nv_alloc();
 	if (nvout == NULL) {
 		pjdlog_error("Unable to allocate header for control response.");
-		error = EHAST_NOMEMORY;
 		goto close;
 	}
 



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