Carlo Arenas <carenas@xxxxxxxxx> writes: > On Tue, Jul 9, 2019 at 2:16 PM Emily Shaffer <emilyshaffer@xxxxxxxxxx> wrote: >> >> diff --git a/transport.c b/transport.c >> index f1fcd2c4b0..d768bc275e 100644 >> --- a/transport.c >> +++ b/transport.c >> @@ -1226,6 +1226,19 @@ int transport_push(struct repository *r, >> err = push_had_errors(remote_refs); >> ret = push_ret | err; >> >> + if ((flags & TRANSPORT_PUSH_ATOMIC) && err) { >> + for (struct ref *it = remote_refs; it; it = it->next) > > moving "struct ref it" out of the loop, allows for building with ancient > compilers that don't support C90 (even if only by default) as I found > out while building pu in a Centos 6 box Does everything else compile OK with your rather old compiler on Centos 6? I was historically rather pedantic to stick to C89 but for past several years we've been experimenting with a bit more modern features of the language to see if anybody screams (namely, designated initializers in structs and arrays, and trailing comma in enum definition) but I think we still reject variable definition in for loop control (we saw and rewrote another patch that tried to use it late last year). Apparently, this one slipped our review process. Thanks. cf. https://public-inbox.org/git/xmqqwopgqsws.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx/ cf. https://public-inbox.org/git/xmqqmuuz9jih.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx/