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