[PATCH 11/59] sunrpc: Remove extra parenthesis on comparison
Sam James
sam@gentoo.org
Sat Oct 18 06:35:53 GMT 2025
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> clang issues:
>
> key_call.c:459:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
> 459 | if ((kcp->client == (CLIENT *) NULL))
>
> Instead of suppress the warning, just use the more usual comparison style.
> ---
> sunrpc/key_call.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
> index c8e414b1df..98abeaf40a 100644
> --- a/sunrpc/key_call.c
> +++ b/sunrpc/key_call.c
> @@ -456,7 +456,7 @@ getkeyserv_handle (int vers)
> return kcp->client;
> }
>
> - if ((kcp->client == (CLIENT *) NULL))
> + if (kcp->client == (CLIENT *) NULL)
> /* Use the AF_UNIX transport */
> kcp->client = clnt_create ("/var/run/keyservsock", KEY_PROG, vers, "unix");
OK.
Reviewed-by: Sam James <sam@gentoo.org>
More information about the Libc-alpha
mailing list