From: Volker Lendecke Date: Thu, 11 Jul 2013 12:57:53 +0000 (+0200) Subject: ccan: Fix calling memset with zero length parameter X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=5628cd2c21655a84dfcf5cc693c8c0d5701fe75d;hp=ba57295a55704ad68f46f7ee741dc8f3ac9db6af ccan: Fix calling memset with zero length parameter Signed-off-by: Volker Lendecke Signed-off-by: Rusty Russell --- 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++;