mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
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>
This commit is contained in:
parent
3bca1e7f9f
commit
2581ea3d31
@ -1227,7 +1227,8 @@ int transport_push(struct repository *r,
|
||||
ret = push_ret | err;
|
||||
|
||||
if ((flags & TRANSPORT_PUSH_ATOMIC) && err) {
|
||||
for (struct ref *it = remote_refs; it; it = it->next)
|
||||
struct ref *it;
|
||||
for (it = remote_refs; it; it = it->next)
|
||||
switch (it->status) {
|
||||
case REF_STATUS_NONE:
|
||||
case REF_STATUS_UPTODATE:
|
||||
|
Loading…
Reference in New Issue
Block a user