Re: [PATCH 0/2] Avoid the comma operator
On 25/03/2025 08:01, Johannes Schindelin via GitGitGadget wrote:
Show 5 quoted lines
> The comma operator
> [https://en.cppreference.com/w/c/language/operator_other#Comma_operator] is
> rarely used in C anymore, and typically indicates a typo. Just like in these
> instances, where a semicolon was meant to be used, as there is no need to
> discard the first statement's result here.
Minor aside: How were these 'discovered'?
Show 14 quoted lines
>
> Johannes Schindelin (2):
> remote-curl: avoid using the comma operator unnecessarily
> rebase: avoid using the comma operator unnecessarily
>
> builtin/rebase.c | 2 +-
> remote-curl.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>
> base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1889%2Fdscho%2Fcomma-operator-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1889/dscho/comma-operator-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1889