Skip to content

Commit b9efce1

Browse files
committed
Merge branch 'jk/remote-curl-an-array-in-struct-cannot-be-null' into maint
Fix a misspelled conditional that is always true. * jk/remote-curl-an-array-in-struct-cannot-be-null: do not check truth value of flex arrays
2 parents 93baadb + 94ee8e2 commit b9efce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remote-curl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ static int fetch_git(struct discovery *heads,
760760

761761
for (i = 0; i < nr_heads; i++) {
762762
struct ref *ref = to_fetch[i];
763-
if (!ref->name || !*ref->name)
763+
if (!*ref->name)
764764
die("cannot fetch by sha1 over smart http");
765765
packet_buf_write(&preamble, "%s %s\n",
766766
sha1_to_hex(ref->old_sha1), ref->name);

0 commit comments

Comments
 (0)