From d6ed5cc100240dc99e3458ec163c06d3c549d2e5 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 Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104 Signed-off-by: Andreas Schneider --- lib/ccan/tally/tally.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index 774373c..29f0555 100644 --- a/lib/ccan/tally/tally.c +++ b/lib/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++; -- 1.8.4