From 5628cd2c21655a84dfcf5cc693c8c0d5701fe75d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 11 Jul 2013 14:57:53 +0200 Subject: [PATCH] ccan: Fix calling memset with zero length parameter Signed-off-by: Volker Lendecke Signed-off-by: Rusty Russell --- ccan/tally/tally.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccan/tally/tally.c b/ccan/tally/tally.c index 774373ca..29f05558 100644 --- a/ccan/tally/tally.c +++ b/ccan/tally/tally.c @@ -506,11 +506,11 @@ char *tally_histogram(const struct tally *tally, if (count > covered) { count -= covered; + memset(p, '*', count); } else { count = 0; } - memset(p, '*', count); p += count; *p = '\n'; p++; -- 2.39.2