summaryrefslogtreecommitdiffstats
path: root/lib/libcasper
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-12-03 13:26:37 +0000
committerpjd <pjd@FreeBSD.org>2013-12-03 13:26:37 +0000
commit56e9c7e3869084c2ff0ad1334ea6b58f9ca64265 (patch)
tree62f7d853e6e01d85415806afd4dc9dcd1c0f3270 /lib/libcasper
parent1692416703a568df7fe1b9077ab6b7d674ddd9f2 (diff)
downloadFreeBSD-src-56e9c7e3869084c2ff0ad1334ea6b58f9ca64265.zip
FreeBSD-src-56e9c7e3869084c2ff0ad1334ea6b58f9ca64265.tar.gz
Fix comparisons in assertions.
Reported by: Coverity Coverity CID: 1130048
Diffstat (limited to 'lib/libcasper')
-rw-r--r--lib/libcasper/libcasper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcasper/libcasper.c b/lib/libcasper/libcasper.c
index 0b84cba..b279c46 100644
--- a/lib/libcasper/libcasper.c
+++ b/lib/libcasper/libcasper.c
@@ -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 *service, int sock,
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 *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 *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 ||
OpenPOWER on IntegriCloud