summaryrefslogtreecommitdiff
path: root/lib/ccan/tally
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-07-11 14:57:53 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-11 16:55:48 +0200
commitf387d9a352141dad9e9aea9e0d19d6d769f414c0 (patch)
tree0a02a9507f0ed991855a828750fe7d3da9210845 /lib/ccan/tally
parent6ac6bf9c8c59fa679436d0d674a1b4525b4c6dbb (diff)
downloadsamba-f387d9a352141dad9e9aea9e0d19d6d769f414c0.tar.gz
samba-f387d9a352141dad9e9aea9e0d19d6d769f414c0.tar.bz2
samba-f387d9a352141dad9e9aea9e0d19d6d769f414c0.zip
ccan: Fix calling memset with zero length parameter
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib/ccan/tally')
-rw-r--r--lib/ccan/tally/tally.c2
1 files changed, 1 insertions, 1 deletions
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++;