From: Atharva Raykar Date: Wed, 02 Jun 2021 08:18:50 GMT Subject: Re: [PATCH][GSoC] submodule: introduce add-clone helper for submodule add Message-ID: <44C3C05A-1BA8-42BF-8614-1BA859050AEE@gmail.com> In-Reply-To: <38AEA0B4-FCF7-4123-9412-98C1394972B0@gmail.com> > On 02-Jun-2021, at 13:25, Atharva Raykar wrote: > > [...] > I've not yet fully developed a taste for good C style, so I wanted > to ask, which one looks better to you in these? > > /* Sample 1 */ > while (begin != end && (line = get_next_line(begin, end))) { > char *name, *url, *tail; > name = parse_token(&begin, next_line); > url = parse_token(&begin, next_line); > tail = parse_token(&begin, next_line); > ... > } > > /* Sample 2 */ > while (begin != end && (line = get_next_line(begin, end))) { > char *name = parse_token(&begin, next_line); > char *url = parse_token(&begin, next_line); > char *tail = parse_token(&begin, next_line); > ... > } Also ignore the error here, assume: s/next_line/line/ (Anyway, my question was about style)