[Skiboot] [PATCH 2/6] external/gard: Fix Coverity defect 107466

Cyril Bur cyril.bur at au1.ibm.com
Tue Sep 8 16:13:59 AEST 2015


Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
 external/gard/gard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/external/gard/gard.c b/external/gard/gard.c
index 5af80d9..03c62a1 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -491,7 +491,7 @@ static int do_clear_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, v
 	if (be32toh(gard->record_id) != *(uint32_t *)priv)
 		return 0;
 
-	memset(&null_gard, INT_MAX, sizeof(null_gard));
+	memset(&null_gard, 0xFF, sizeof(null_gard));
 
 	largest = get_largest_pos(ctx);
 
-- 
2.5.1



More information about the Skiboot mailing list