From 4544d9a0aa23b85ac81be58e4c2f7adc4c3c0cff Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 23 Jan 2024 15:54:41 +0100 Subject: Prefer memset() --- cbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cbs.h b/cbs.h index dd39f28..b8b7ece 100644 --- a/cbs.h +++ b/cbs.h @@ -349,7 +349,7 @@ void strvfree(struct strv *v) { free(v->buf); - *v = (struct strv){0}; + memset(v, 0, sizeof(*v)); } void * -- cgit v1.2.3