From f387d9a352141dad9e9aea9e0d19d6d769f414c0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 11 Jul 2013 14:57:53 +0200 Subject: 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 --- lib/ccan/tally/tally.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ccan') diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index 774373ca0f..29f0555880 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++; -- cgit