Message ID | 1de9cab8.c1.1844d7bdf4b.Coremail.wangkailong@jari.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1545235wru; Sun, 6 Nov 2022 07:25:40 -0800 (PST) X-Google-Smtp-Source: AMsMyM4qTlmaqbpR107RalnXXxfypXWWW1bwShY5Xh/GzofbFDaSgTYzYxCF0vW+G7uDQI92dCFP X-Received: by 2002:a05:6402:274c:b0:461:9921:60cf with SMTP id z12-20020a056402274c00b00461992160cfmr46517227edd.353.1667748340564; Sun, 06 Nov 2022 07:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667748340; cv=none; d=google.com; s=arc-20160816; b=MSOkhRGHbo7o2m92lwLwpl+LcQ269S1drd13cs4M3kexT7IGYM6fkcwF1McS5s6z5w YSPJXyt4fZSGtB84ywXj/B6cTVbe4vn0WL/x0XeMJ2qvG5KYwZ6QyLLUri5poFNEfOAg kwuL54uo5DfeK091IGMHsVCbeSFl3KdKXLYqMG1yPea6V/vtU+BS4I70ptP5lH1dZ2xy fZDqY4cGYHSG2KUj6ev4MPgViMTTeZo+i73pbmbd1u9q/vJJGE9esh+XyzItR3Fkaq49 OTDrPDjUN76omI8YiBOBbtcEO/De6nm4vh8RcvD1vJuMuG/BPy+pFaqcCVIAlEPG3U0a n9ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=/IItKhOT0WI+i/8vhrTysEGulebyt5nfkIcGzr45YS0=; b=fpH+VsvGaiRTF0b7Fb3PTHrMWtoNzGOziwqmXxi0XXIUhV5O2nFhdfocpRzc5WPBLI zUssidIrRIQHmUyETuZB1/gRWbfi+jc7mn/Wyya0ZlZw6qzHswXii9NG+kqMqg2R1GAF MX6L9tueeHzy9shh+XR2zEdgW7+eqJbWrm6b9jjtc0DwZXpx9ExvTU18MFj1PL53AS5P rUn6sADxuuCYlEJBLXuS8LNv75HFQydj3V19i0zUS1GEH9l5hRrZN5m0dzgiVhadWruL D5jGyB2oj5wgs3WFFyo17EwYY8l8DA+mbxlDKRCip71pJphV/8p4M/zXzu844JZoOVKu /XVg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a05640211cc00b00461b0566a29si6816471edw.137.2022.11.06.07.25.16; Sun, 06 Nov 2022 07:25:40 -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 S230047AbiKFPM4 (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sun, 6 Nov 2022 10:12:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiKFPMy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Nov 2022 10:12:54 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 937F56418 for <linux-kernel@vger.kernel.org>; Sun, 6 Nov 2022 07:12:53 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 6 Nov 2022 23:07:54 +0800 (GMT+08:00) X-Originating-IP: [182.148.13.29] Date: Sun, 6 Nov 2022 23:07:54 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, samuel.thibault@ens-lyon.org, gregkh@linuxfoundation.org Cc: speakup@linux-speakup.org, linux-kernel@vger.kernel.org Subject: [PATCH] speakup: Fix warning comparing pointer to 0 X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <1de9cab8.c1.1844d7bdf4b.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXq+HKzWdj6IsBAA--.49W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQACB2FEYx0CyAAQsF X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748760883813805648?= X-GMAIL-MSGID: =?utf-8?q?1748760883813805648?= |
Series |
speakup: Fix warning comparing pointer to 0
|
|
Commit Message
KaiLong Wang
Nov. 6, 2022, 3:07 p.m. UTC
Fix the following coccicheck warning:
drivers/accessibility/speakup/utils.h:39:15-16: WARNING comparing
pointer to 0
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
drivers/accessibility/speakup/utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
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
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); }