string_list: Add STRING_LIST_INIT macro and make use of it.
Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8a57c6e943
commit
183113a5ca
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user