From patchwork Mon May 10 12:38:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 433140 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2882516jao; Mon, 10 May 2021 07:12:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT3Mbu07+gDlwLT5c/T29cJlC4YteFAQpzWeXp/DT0VaY0mgyNY55wgvk/PfK86D9YI8pZ X-Received: by 2002:a92:7609:: with SMTP id r9mr22572139ilc.297.1620655931252; Mon, 10 May 2021 07:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620655931; cv=none; d=google.com; s=arc-20160816; b=uQyz6+bl776OaSBlLI7bxthhKHH6lp7z032szWFZv/4fWErMaovaQsq2xWk9/ahcgK SA0CxXzE4mwCYY/hBRjeWW96reN+TEkd7prEpYkpSHLVS3E3921LWie0PsiJpQ8VHf2W Xt4vsV8ycVuJeHZJeOGcs6jw0BnlK5+oavBF2V5ccg9Ex/5iudtDceYN81y2xJIdUH3+ esG3qCs1JwRGcXm44vb+fpFlW7FpzA9XpGjSenAOSemqj4yXHkHiIaQab4r6De71X+mK HSyloGPKrBPCR2z/GLKhHTrWTiCSu0pv+sPEg1hy+SeelqnTvw16Ovn/bU7zEDwMZ9sU 2axA== 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; bh=p+bV5wgmal2ozvEskiwSb5PzQv+Yxq6dY1JxRcyV01U=; b=fFyf8zty4zHVioRrnHKYyeFm5VzgTRAXQDYKmHc8wPUC/Cpd00im3h7hLFs4bqGJf6 4RPs/zuDl3yOV87/+afhGduFc/Wxz/gm1NORV+bLe76OIv03OtgJZofQ7wiZkLLEsd5i zfG/KUVDyV6QSpnpsD6CJd5RxyuJd4YjdPhgsUXzq7+8zIHoj5BBDoYfEdFvC1SsIiKg 6fqhYtf/9bVSQBbxtW8qyDRt5LBrCVnS7uU7DFXlnCzwF7hZPKkNiQby/ZUxsoYz5Q9b 2ruGtlDRUpPtXxTcXfHV5hd0oL4tTrp2MjglV5RAf7PnR84ZJU8PtaxXNxolMew0E3fC QKeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si16406157ior.12.2021.05.10.07.12.11; Mon, 10 May 2021 07:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbhEJNlI (ORCPT + 5 others); Mon, 10 May 2021 09:41:08 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2753 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348031AbhEJMjj (ORCPT ); Mon, 10 May 2021 08:39:39 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Ff0r83DBWzqSTG; Mon, 10 May 2021 20:35:04 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Mon, 10 May 2021 20:38:18 +0800 From: Zhen Lei To: Shuah Khan , linux-kselftest CC: Zhen Lei Subject: [PATCH 1/1] mnt: Delete two unneeded bool conversions Date: Mon, 10 May 2021 20:38:05 +0800 Message-ID: <20210510123805.3801-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei --- tools/testing/selftests/mount/unprivileged-remount-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c index 584dc6bc3b06679..d2917054fe3ae56 100644 --- a/tools/testing/selftests/mount/unprivileged-remount-test.c +++ b/tools/testing/selftests/mount/unprivileged-remount-test.c @@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options, if (!WIFEXITED(status)) { die("child did not terminate cleanly\n"); } - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; + return WEXITSTATUS(status) == EXIT_SUCCESS; } create_and_enter_userns(); @@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void) if (!WIFEXITED(status)) { die("child did not terminate cleanly\n"); } - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; + return WEXITSTATUS(status) == EXIT_SUCCESS; } orig_mnt_flags = read_mnt_flags(orig_path);