From 183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2 Mon Sep 17 00:00:00 2001 From: Thiago Farina Date: Sun, 4 Jul 2010 16:46:19 -0300 Subject: string_list: Add STRING_LIST_INIT macro and make use of it. Acked-by: Jonathan Nieder Signed-off-by: Thiago Farina Signed-off-by: Junio C Hamano --- diff-no-index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'diff-no-index.c') diff --git a/diff-no-index.c b/diff-no-index.c index 43aeeba2e0..ce9e783407 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -64,7 +64,8 @@ static int queue_diff(struct diff_options *o, if (S_ISDIR(mode1) || S_ISDIR(mode2)) { char buffer1[PATH_MAX], buffer2[PATH_MAX]; - struct string_list p1 = {NULL, 0, 0, 1}, p2 = {NULL, 0, 0, 1}; + struct string_list p1 = STRING_LIST_INIT_DUP; + struct string_list p2 = STRING_LIST_INIT_DUP; int len1 = 0, len2 = 0, i1, i2, ret = 0; if (name1 && read_directory(name1, &p1)) -- cgit v1.2.3