Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1148193rwb; Tue, 4 Oct 2022 16:27:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5aPqSNwFZ/icB7KbU9ANUBfWnbzgkdcliGnqg0GMpSQWWIxjCikp8y2GK60l3Hd9WpIdVw X-Received: by 2002:a05:6402:3584:b0:458:d3fa:fb89 with SMTP id y4-20020a056402358400b00458d3fafb89mr14872633edc.218.1664926048873; Tue, 04 Oct 2022 16:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664926048; cv=none; d=google.com; s=arc-20160816; b=ddGkYie7dk/0Mk6brNPpSYRr3yPtJEpGYUoT2k5K881UbE828ANwoXfmfejLQWwAL0 342ALuLFMlaJinBCMAZv3liwDPgUXqs2ElSDpk5eCp/PMMzfqKDnt2H0KUDQXNVI/s/O LgCPyC2n5rVbom7ReoogQrMa1mXLnv7HvlAXq2lctyFXQIiVxb+2wbOJ3+sc51kgkYLG vNfGFj8Q0GiN38CD5MUE0Q+HmsPH+VDJviH3VamF9qv7PTxKhYhNviZcE96T8bZb+ua3 EHYeFnf1tZQBY2MUX5HwuARtTtRiOxHilcEAbpWh7PwQ0dn0+ogaTI5/m2EY32UzHoNg Ph5A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KwqAEOw9+eCjtZXAH87PlnrQg+KgRwFvEXJEx/wkreg=; b=YwrQ3OPszw3XNYyR5K2L/kfO+ped2tbKMEaaNFdAp+3TdeImiw6PpKn2iCLuDNaiut 8evd/DHYneVd0kDmZEUYCNN1E8JAm3pH6aoff904QqbwcqCpRvvo8Q8GMvnlQIom0gkz j7OSWj9DIsYJJ1J/uuBbJzRgqszHtmlL1P1O6W0xVzLFXhjwWOV9yw5tgkb/gMlhHo3V XdHsRQxIpR4tasOqfYG6C0+0OMjyaxZ0g3pLvd2+3hfc7sZUwsF4Zcmxll1cZW/rosic HlJtLDuVh9Rfo3rGbAn+YP1y26GtIDOr6o9ZqPr0r0bjrc3/sIzXsxZogtuD1e9Ahs+f UbNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fUDvX9vR; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a056402520d00b00450c8cd976esi12917026edd.224.2022.10.04.16.27.04; Tue, 04 Oct 2022 16:27:28 -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=@kernel.org header.s=k20201202 header.b=fUDvX9vR; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbiJDXYY (ORCPT + 99 others); Tue, 4 Oct 2022 19:24:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbiJDXYW (ORCPT ); Tue, 4 Oct 2022 19:24:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB74158DE0 for ; Tue, 4 Oct 2022 16:24:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8819A61539 for ; Tue, 4 Oct 2022 23:24:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7461CC433B5; Tue, 4 Oct 2022 23:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664925860; bh=FLSPg+BDw6WCtKWX2GlQGeBJ1gmzbxSrtkABWZcLRH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fUDvX9vReXInB+JLUJaiAcizXIl5NvllyNUiwgYkizxc/pzF/nBLhLmBifcR3w/fa mB5HtLuPWqBeP4ceQ7scSbVOGW+iT+nWR5Jj72TktaOAqIXHaS1jVG5eJy95bN87Ja Z3tGTp1GNVW4NxgvqOGoeonAw5tNMeLwLirUhyEXBk3Y1FSJWPQnEkRy1hK0b0futr exWB2JCYHnz1CtodYeLLhkmHkgLEyj1ClO+JR4MZcC0a+cheXBZ2I/spYycL9/eYPt U+yENm4eVHBnpI/cDw8Ry5UdmFEeXEky3lH9m5tnxslqWf4/UMgJro3OPY4j9NQAy7 ztGCeF+eFkE9w== From: Nathan Chancellor To: Konstantin Komarov Cc: Nick Desaulniers , Tom Rix , ntfs3@lists.linux.dev, llvm@lists.linux.dev, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH -next v2 2/2] fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare() Date: Tue, 4 Oct 2022 16:23:59 -0700 Message-Id: <20221004232359.285685-2-nathan@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221004232359.285685-1-nathan@kernel.org> References: <20221004232359.285685-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 'a == b ? 0 : 1' is logically equivalent to 'a != b'. Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v2: New patch. fs/ntfs3/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c index 5d3a6ce3f05f..6b0d2c01d6ff 100644 --- a/fs/ntfs3/namei.c +++ b/fs/ntfs3/namei.c @@ -432,7 +432,7 @@ static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1, /* First try fast implementation. */ for (;;) { if (!lm--) - return len1 == len2 ? 0 : 1; + return len1 != len2; if ((c1 = *n1++) == (c2 = *n2++)) continue; -- 2.37.3