transport-helper: avoid var decl in for () loop control

We do allow a few selected C99 constructs in our codebase these days, but this is not among them (yet). Reported-by: Carlo Arenas <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 16, 2019 at 13:28 UTC 2581ea3d31a178df6b073226f0ee0ab5b3ca3a24
1 file changed +2 -1
transport.c
+2 -1
@@ -1227,7 +1227,8 @@ int transport_push(struct repository *r,
1227 ret = push_ret | err;
1228
1229 if ((flags & TRANSPORT_PUSH_ATOMIC) && err) {
1230 - for (struct ref *it = remote_refs; it; it = it->next)
1230 + struct ref *it;
1231 + for (it = remote_refs; it; it = it->next)
1232 switch (it->status) {
1233 case REF_STATUS_NONE:
1234 case REF_STATUS_UPTODATE: