Skip to content

Commit

Permalink
Merge branch 'jk/remote-curl-an-array-in-struct-cannot-be-null' into …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Junio C Hamano committed Feb 25, 2015
2 parents 93baadb + 94ee8e2 commit b9efce1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remote-curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static int fetch_git(struct discovery *heads,

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

0 comments on commit b9efce1

Please sign in to comment.