Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp472289rwb; Sun, 6 Nov 2022 08:38:04 -0800 (PST) X-Google-Smtp-Source: AMsMyM4C4h5ozz00XTSI2Rat1laFDXVQEokNxSkVBhXbjiyzQKpc9fHuhBCRjzr7LR3ff8X3775P X-Received: by 2002:aa7:ce09:0:b0:461:5406:20e4 with SMTP id d9-20020aa7ce09000000b00461540620e4mr46109172edv.5.1667752683814; Sun, 06 Nov 2022 08:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667752683; cv=none; d=google.com; s=arc-20160816; b=TJtUHD886SOPIUXWuXd/fYToDrTY7ansTshI9wyT6vlJdnYW3YkGS0c/KvQ5Zi2z9N 1+501lgWIjhBiNGW559Y4PrLzloqXPJKIbxwoxIoJug1PYEuzsBa+VS5m6WXJ9YmJ9H7 DOvj+MW5Oe2HqjbqD8SJhQ0o5/7uVKr1yekcox4vLvpv9s3pmVtbaK73hJo9IuPpaFqC muL2SJdhDLyNnE2QkqrflQLiURmnWRxgU41EeOmhw4t4ORKnT2KHZVMvG0g03gwG/ZCM lPyZwPwQX2lJnY/orbt8z/dqohqabSFPkg9zjWGX2m6en0a0L4mrP1EZGr5W/9U2XndC /T3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:organization:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=SpZ8xIuaUXz8X3ZZpkFDPO/uLeme5bSoQVyV05dVeSM=; b=yGVWg/W+2DmAZ+jKpNjPKlRrt3exgyJ7hz2WJjTYQE5hLvuDIjtQyoC5g3/Xe3pUcE xWJxjQTHRP7HFtJJBPXCX7SR6t36LR/AUibig8uC/LSdei0hDX32V+pNZnS0TS5Sr/7j ThMi1+8MsC5UAKymTjp5UTwibttOc8ewXiLg+yJFpGkSoYGTTtR034ODZ187URzl5lDm wDym7d/mhhe/M+xOJRse4IGD4Lca6x/jDPo3ElfwwYdIqVE/1rczliJGl3ezQYWW0P+2 E20Wn0jMj/horw53jOYr/YnTvRUo7CIwjEc/Mx7c2fknl3yGRHpHArYuNGSFCEQU/78u PNjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a17090627c800b0078c2c22d6cesi4674120ejc.70.2022.11.06.08.37.34; Sun, 06 Nov 2022 08:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbiKFPvO (ORCPT + 96 others); Sun, 6 Nov 2022 10:51:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbiKFPvN (ORCPT ); Sun, 6 Nov 2022 10:51:13 -0500 Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D016DED9 for ; Sun, 6 Nov 2022 07:51:12 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 352822010B; Sun, 6 Nov 2022 16:51:10 +0100 (CET) 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 zKeRytKHzjnZ; Sun, 6 Nov 2022 16:51:10 +0100 (CET) Received: from begin (lfbn-bor-1-376-208.w109-215.abo.wanadoo.fr [109.215.91.208]) (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 85C4520107; Sun, 6 Nov 2022 16:51:09 +0100 (CET) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1orhvR-00DuLc-0S; Sun, 06 Nov 2022 16:51:09 +0100 Date: Sun, 6 Nov 2022 16:51:09 +0100 From: Samuel Thibault To: wangkailong@jari.cn Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, gregkh@linuxfoundation.org, speakup@linux-speakup.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] speakup: Fix warning comparing pointer to 0 Message-ID: <20221106155109.wh5ivhk2zc7cumn5@begin> Mail-Followup-To: Samuel Thibault , wangkailong@jari.cn, w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, gregkh@linuxfoundation.org, speakup@linux-speakup.org, linux-kernel@vger.kernel.org References: <1de9cab8.c1.1844d7bdf4b.Coremail.wangkailong@jari.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1de9cab8.c1.1844d7bdf4b.Coremail.wangkailong@jari.cn> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wangkailong@jari.cn, le dim. 06 nov. 2022 23:07:54 +0800, a ecrit: > Fix the following coccicheck warning: > > drivers/accessibility/speakup/utils.h:39:15-16: WARNING comparing > pointer to 0 You're replacing it with the contrary of what it should be... > --- > 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..5803b521df2b 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.25.1