Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3540313rwi; Wed, 12 Oct 2022 03:38:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eDqRKTseu6DHf+lYShsMw9Fiew11Zsab+8SKHZkRZhOasuIpw65sbvq+b0tnYdy3syECI X-Received: by 2002:a63:8349:0:b0:46a:b78b:3b64 with SMTP id h70-20020a638349000000b0046ab78b3b64mr1528562pge.292.1665571099115; Wed, 12 Oct 2022 03:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665571099; cv=none; d=google.com; s=arc-20160816; b=mKLnm6uTNm0PPKnwe5M1tsayB2Qo9DfBwT4ASysV88HYqTrnGw8c3KAKBI+SWBlWMH 4OnE48YJ5EAW3JH2Fa/np7aL8d1iT5gUH2zmK0M75/87VGP6v+cLqUpzW1eXDvUK1BE+ By0pu1M3p1+sCZdOv6xHSPy8NDPMjhJIHsnShCq9oMP+gg6YszwRP4ZukBmnnxQsxuVp d7k3tRK0Q95Rt1UTt0zCxPLSs813nhpbSmXBJwUMIorthAG+rYf0lhBICvczB3KeMvRz kCF1wussLFYIyKTopMQTwgX7UfF3UmfecdiH6PeUrgtjYs8xHpnSvAUdbE0qOnLS2oeU 0+Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AcWP8G1hp5qNg/Pxxjv4XCndAjHqNWMsARLGYF5eowo=; b=T1bS1f6Nuo1rolsz2FW2rduZ933T88ZitOTaLUidw3OBY/kg2RFLh3lwMjclA3LHFa NzQsjOBHuZizgP7o6GGys3DPqNSa3wN964lUsMEV7jL6lCMb/pDmcxOWuOK6fTjReomL U5Lotv6wvTS0g2XNScyoKiZejUt1mzrqTGM5CRzKhYOGQH6xWQvh6cbIX1KuAnI6x2iN Nb2UgX5MUr2BszbkEwtPnX7UqcVbY2dgteSx/tWlPH3GhhhmzYqZRdssOGsU17NQ8g7v /sBxphQ5hzNSa4sDi7LCLH7qi8W2Q7lJ2LbbvRIYxPUzVEmlX83ngeMuvv5P5RKeFxD6 JEuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GIxoCY8W; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 27-20020a63195b000000b004468ff8fc5bsi18877736pgz.299.2022.10.12.03.38.06; Wed, 12 Oct 2022 03:38:19 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GIxoCY8W; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229610AbiJLKFU (ORCPT + 99 others); Wed, 12 Oct 2022 06:05:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbiJLKFR (ORCPT ); Wed, 12 Oct 2022 06:05:17 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80DE337F9C for ; Wed, 12 Oct 2022 03:05:16 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id l1so15762674pld.13 for ; Wed, 12 Oct 2022 03:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AcWP8G1hp5qNg/Pxxjv4XCndAjHqNWMsARLGYF5eowo=; b=GIxoCY8WsX5MRW7J0e5Y/xbLNipkLoixAqGj/bF5QEH1LhnD7SsVSZGmieJilVhvQ/ vrEmfj9tNVYJnyLch2YaiVp1OnOCfw8CoHlx9KTVGWp5CF5mtpzxufJ0AgQ1U4ykPy9d Knt+nCN/krFaeHIvtFwq1agjhrqXUfBCAT3/k/fx77Z3CRmn27GBDIjjj3YlaIb1ewok 3zW94ICe+UQv7CppaioxcWoXs8eD9zaozoGUiswMApHl1Jv/Nzmajr+5L9urjWtTbMhg yMOZOtw7BV324J/xJhJonZRSyFQ0R0GKFz3MiQp4yh4Xp64Pi6NSU02/ugXKD9i6+p3b ejjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AcWP8G1hp5qNg/Pxxjv4XCndAjHqNWMsARLGYF5eowo=; b=bqXHpyuYgZ4L+YUIJu5i5xKKnBGUovZ/1huoftVMHPj2pzFAZZEMtxX/y4yViQA+Jj /Fkttw0dwVdtUiAodGHpnYRSsYVumU5Mrn8KBgpzPEZLzQIqNesEkHbMjwG9yn0xsZh3 FX50Iz9hAS0kIkiZHD8MHGFjgZytrDRNJB4ukhVUqjj5QjHYvGbBa0H6YaLl9A0YCqsD 45tErS9BROJdkJA7hFKJe7CoPHZCp+EGllL7F+tZ1uFlJpAhRU8/I2l8TuyL8o7pJhy+ r56C9sE/5itbMdfg/aruIdCPbOuopRbO49fvsG64iccl3IGclaCvjbZSuXyHuZFaAXNe KDSg== X-Gm-Message-State: ACrzQf30HT8H4A3TNZ4ui4L9qxiuAIC+cyEY6LEbq0PcFb8YRWo3JbHB e7ve6XFOA9bi4u6Jnp7YGZyI1fkvmiQhtg== X-Received: by 2002:a17:903:22c8:b0:17f:7039:a2d4 with SMTP id y8-20020a17090322c800b0017f7039a2d4mr29496694plg.2.1665569116022; Wed, 12 Oct 2022 03:05:16 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id f8-20020a170902684800b0017f93a4e330sm3794529pln.193.2022.10.12.03.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 03:05:15 -0700 (PDT) From: xu.panda668@gmail.com To: w.d.hubbs@gmail.com Cc: chris@the-brannons.com, kirk@reisers.ca, linux-kernel@vger.kernel.org, Xu Panda , Zeal Robot Subject: [PATCH linux-next] speakup: fix comparing pointer to 0 Date: Wed, 12 Oct 2022 10:04:55 +0000 Message-Id: <20221012100454.347873-1-xu.panda668@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 From: Xu Panda Comparing pointer to NULL is more appropriate, and we usually compare int to 0 and judge bool directly. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- 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..a1792f3734ad 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 == NULL) { fprintf(stderr, "can't open %s\n", filename); exit(1); } -- 2.15.2