changeset 1:cf8cb4a0729e

buf_sub: don't memset destination
author David Demelier <markand@malikania.fr>
date Thu, 29 Oct 2020 17:28:23 +0100
parents b1991ee4451d
children 3665a56a00aa
files buf-sub.c
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/buf-sub.c	Thu Oct 29 17:24:30 2020 +0100
+++ b/buf-sub.c	Thu Oct 29 17:28:23 2020 +0100
@@ -29,8 +29,6 @@
 	assert(src);
 	assert(pos <= src->length);
 
-	memset(b, 0, sizeof (*b));
-
 	if (count >= src->length)
 		count = src->length - pos;
 	if (!(b->data = BUF_MALLOC(count + 1)))