Junio C Hamano wrote: > Elijah Newren <newren@xxxxxxxxx> writes: > > > I wonder if a slightly different codeflow may be easier to follow > >> > >> struct commit_list *result = NULL; > >> while (list) { > >> struct commit_list *next = list->next; > >> list->next = result; > >> result = list; > >> list = next; > >> } > >> return result; > >> > >> if we were to try improving this for readability? > > > > Looks like Felipe also came up with the same version you did (modulo > > the temporary variable name). > > Funny if it was sent as a response to the message that already had > the same answer... It's two changes, actually: s/result/current/ and s/next/tmp/. But yeah, it's interesting that I used Elijahs's version as a basis and arrived at virtually the same thing. Cheers. -- Felipe Contreras