Re: [PATCH v2 08/10] compat/regex: explicitly mark intentional use of the comma operator
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 26, 2025, 20:35 UTC
- Message-ID
- <Z+RlEwwTvFkUWwkT@nand.local>
- In-Reply-To
- <dc626f36df34df4897289e508dbf608512a93870.1742945534.git.gitgitgadget@gmail.com>
On Tue, Mar 25, 2025 at 11:32:12PM +0000, Johannes Schindelin via GitGitGadget wrote:
Show 15 quoted lines
> diff --git a/compat/regex/regex_internal.c b/compat/regex/regex_internal.c
> index ec5cc5d2dd1..7672583bf7e 100644
> --- a/compat/regex/regex_internal.c
> +++ b/compat/regex/regex_internal.c
> @@ -1231,9 +1231,10 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
> for (sbase = dest->nelem + 2 * src->nelem,
> is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
> {
> - if (dest->elems[id] == src->elems[is])
> - is--, id--;
> - else if (dest->elems[id] < src->elems[is])
> + if (dest->elems[id] == src->elems[is]) {
> + is--;
> + id--;
> + } else if (dest->elems[id] < src->elems[is])Should the other arms of this conditional have matching curly-braces?
Thanks, Taylor