summaryrefslogtreecommitdiff
path: root/strvec.c
diff options
context:
space:
mode:
Diffstat (limited to 'strvec.c')
-rw-r--r--strvec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/strvec.c b/strvec.c
index 21dce0a7a4..61a76ce6cb 100644
--- a/strvec.c
+++ b/strvec.c
@@ -6,9 +6,8 @@ const char *empty_strvec[] = { NULL };
void strvec_init(struct strvec *array)
{
- array->v = empty_strvec;
- array->nr = 0;
- array->alloc = 0;
+ struct strvec blank = STRVEC_INIT;
+ memcpy(array, &blank, sizeof(*array));
}
static void strvec_push_nodup(struct strvec *array, const char *value)