From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8717DECAAA1 for ; Mon, 12 Sep 2022 11:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbiILLDE (ORCPT ); Mon, 12 Sep 2022 07:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiILLDD (ORCPT ); Mon, 12 Sep 2022 07:03:03 -0400 Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 556D9220CC for ; Mon, 12 Sep 2022 04:03:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 8A0072012C; Mon, 12 Sep 2022 13:03:00 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yh6EehX2MSYf; Mon, 12 Sep 2022 13:03:00 +0200 (CEST) Received: from begin (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 32C0120127; Mon, 12 Sep 2022 13:02:59 +0200 (CEST) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1oXhDO-008y6m-1O; Mon, 12 Sep 2022 13:02:58 +0200 Date: Mon, 12 Sep 2022 13:02:58 +0200 From: Samuel Thibault To: cgel.zte@gmail.com Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, Cspeakup@linux-speakup.org, linux-kernel@vger.kernel.org, Xu Panda , Zeal Robot Subject: Re: [PATCH linux-next] speakup/utils: use "!P" instead of "P == 0" Message-ID: <20220912110258.jwyv4xenfdvmo3p3@begin> Mail-Followup-To: Samuel Thibault , cgel.zte@gmail.com, w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, Cspeakup@linux-speakup.org, linux-kernel@vger.kernel.org, Xu Panda , Zeal Robot References: <20220912102059.18215-1-xu.panda@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912102059.18215-1-xu.panda@zte.com.cn> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cgel.zte@gmail.com, le lun. 12 sept. 2022 10:21:00 +0000, a ecrit: > From: Xu Panda > > comparing pointer to 0, use !P instead of it. > > Reported-by: Zeal Robot > Signed-off-by: Xu Panda Reviewed-by: Samuel Thibault > --- > drivers/accessibility/speakup/utils.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/accessibility/speakup/utils.h b/drivers/accessibility/speakup/utils.h > index 4bf2ee8ac246..58ca9847637f 100644 > --- a/drivers/accessibility/speakup/utils.h > +++ b/drivers/accessibility/speakup/utils.h > @@ -36,7 +36,7 @@ static inline void open_input(const char *dir_name, const char *name) > else > snprintf(filename, sizeof(filename), "%s", name); > infile = fopen(filename, "r"); > - if (infile == 0) { > + if (!infile) { > fprintf(stderr, "can't open %s\n", filename); > exit(1); > } > -- > 2.15.2 >