Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2013 13:26:37 +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: r258866 - head/lib/libcasper
Message-ID:  <201312031326.rB3DQb0I030757@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Tue Dec  3 13:26:37 2013
New Revision: 258866
URL: http://svnweb.freebsd.org/changeset/base/258866

Log:
  Fix comparisons in assertions.
  
  Reported by:	Coverity
  Coverity CID:	1130048

Modified:
  head/lib/libcasper/libcasper.c

Modified: head/lib/libcasper/libcasper.c
==============================================================================
--- head/lib/libcasper/libcasper.c	Tue Dec  3 04:32:02 2013	(r258865)
+++ head/lib/libcasper/libcasper.c	Tue Dec  3 13:26:37 2013	(r258866)
@@ -114,7 +114,7 @@ service_free(struct service *service)
 {
 	struct service_connection *sconn;
 
-	PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC);
+	PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC);
 
 	service->s_magic = 0;
 	while ((sconn = service_connection_first(service)) != NULL)
@@ -130,7 +130,7 @@ service_connection_add(struct service *s
 	struct service_connection *sconn;
 	int serrno;
 
-	PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC);
+	PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC);
 
 	sconn = malloc(sizeof(*sconn));
 	if (sconn == NULL) {
@@ -168,7 +168,7 @@ service_connection_remove(struct service
     struct service_connection *sconn)
 {
 
-	PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC);
+	PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC);
 	PJDLOG_ASSERT(sconn->sc_magic == SERVICE_CONNECTION_MAGIC);
 
 	TAILQ_REMOVE(&service->s_connections, sconn, sc_next);
@@ -206,7 +206,7 @@ service_connection_first(struct service 
 {
 	struct service_connection *sconn;
 
-	PJDLOG_ASSERT(service->s_magic = SERVICE_MAGIC);
+	PJDLOG_ASSERT(service->s_magic == SERVICE_MAGIC);
 
 	sconn = TAILQ_FIRST(&service->s_connections);
 	PJDLOG_ASSERT(sconn == NULL ||



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