]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strvec.c
Merge branch 'jk/apply-binary-hunk-parsing-fix'
[thirdparty/git.git] / strvec.c
index 21dce0a7a4d211f9810a95682fcd7cfe4635b6a2..61a76ce6cb920f33744e82111c800da8439ed975 100644 (file)
--- 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)