f02953d
From ae2520e013caf4f5d0dae89623dc08925d6cd472 Mon Sep 17 00:00:00 2001
f02953d
From: Peter Jones <pjones@redhat.com>
f02953d
Date: Wed, 28 Oct 2015 15:58:07 -0400
f02953d
Subject: [PATCH] Fix one more -Wsign-compare problem I missed.
f02953d
f02953d
Signed-off-by: Peter Jones <pjones@redhat.com>
f02953d
---
f02953d
 src/daemon.c | 14 +++++++-------
f02953d
 1 file changed, 7 insertions(+), 7 deletions(-)
f02953d
f02953d
diff --git a/src/daemon.c b/src/daemon.c
f02953d
index 02b7352..175c874 100644
f02953d
--- a/src/daemon.c
f02953d
+++ b/src/daemon.c
f02953d
@@ -194,7 +194,7 @@ malformed:
f02953d
 		return;
f02953d
 	}
f02953d
 	n -= sizeof(tn->size);
f02953d
-	if (n < tn->size)
f02953d
+	if ((size_t)n < tn->size)
f02953d
 		goto malformed;
f02953d
 	n -= tn->size;
f02953d
 
f02953d
@@ -202,10 +202,10 @@ malformed:
f02953d
 		goto malformed;
f02953d
 
f02953d
 	pesignd_string *tp = pesignd_string_next(tn);
f02953d
-	if (n < (long long)sizeof(tp->size))
f02953d
+	if ((size_t)n < sizeof(tp->size))
f02953d
 		goto malformed;
f02953d
 	n -= sizeof(tp->size);
f02953d
-	if (n < tp->size)
f02953d
+	if ((size_t)n < tp->size)
f02953d
 		goto malformed;
f02953d
 	n -= tp->size;
f02953d
 
f02953d
@@ -298,7 +298,7 @@ malformed:
f02953d
 		return;
f02953d
 	}
f02953d
 	n -= sizeof(tn->size);
f02953d
-	if (n < tn->size)
f02953d
+	if ((size_t)n < tn->size)
f02953d
 		goto malformed;
f02953d
 	n -= tn->size;
f02953d
 
f02953d
@@ -487,7 +487,7 @@ malformed:
f02953d
 	}
f02953d
 
f02953d
 	n -= sizeof(tn->size);
f02953d
-	if (n < tn->size)
f02953d
+	if ((size_t)n < tn->size)
f02953d
 		goto malformed;
f02953d
 	n -= tn->size;
f02953d
 
f02953d
@@ -497,11 +497,11 @@ malformed:
f02953d
 	if (!ctx->cms->tokenname)
f02953d
 		goto oom;
f02953d
 
f02953d
-	if (n < (long long)sizeof(tn->size))
f02953d
+	if ((size_t)n < sizeof(tn->size))
f02953d
 		goto malformed;
f02953d
 	pesignd_string *cn = pesignd_string_next(tn);
f02953d
 	n -= sizeof(cn->size);
f02953d
-	if (n < cn->size)
f02953d
+	if ((size_t)n < cn->size)
f02953d
 		goto malformed;
f02953d
 
f02953d
 	ctx->cms->certname = PORT_ArenaStrdup(ctx->cms->arena,
f02953d
-- 
f02953d
2.5.0
f02953d