Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
transport-helper: avoid var decl in for () loop control
author
Junio C Hamano
<gitster@pobox.com>
Tue, 16 Jul 2019 20:28:21 +0000
(13:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 16 Jul 2019 20:30:33 +0000
(13:30 -0700)
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>
transport.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
3bca1e7
)
diff --git
a/transport.c
b/transport.c
index d768bc275e3df00a670f59e754c1d651371593d7..453de8f7041b966a9bd0eaee20ef8f5758cec2f1 100644
(file)
--- a/
transport.c
+++ b/
transport.c
@@
-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: