From: Junio C Hamano Date: Sun, 18 Dec 2022 01:33:07 GMT Subject: Re: [PATCH v3] line-range: Fix infinite loop bug with degenerate '$' regex Message-ID: In-Reply-To: <20221214145341.sonppjtshwqoxs6n@oddbit.com> Lars Kellogg-Stedman writes: >> > @@ -161,6 +160,7 @@ static const char *find_funcname_matching_regexp(xdemitconf_t *xecfg, const char >> > return bol; >> > start = eol; >> > } >> > + return NULL; >> > } >> >> What is this change about? Isn't the above an endless loop without >> break, from which the only way for the control to leave it is by >> returning? > > It's not an endless loop without break; this change modified the loop > condition: Ah, thanks, that's clear, and sorry for the noise, and thanks.