svn commit: r228542 - head/sbin/hastd

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Dec 15 22:01:35 UTC 2011


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;
 	}
 


More information about the svn-src-head mailing list