lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1604644146-598-1-git-send-email-kaixuxia@tencent.com>
Date:   Fri,  6 Nov 2020 14:29:06 +0800
From:   xiakaixu1987@...il.com
To:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...hat.com, namhyung@...nel.org, adrian.hunter@...el.com
Cc:     linux-kernel@...r.kernel.org, Kaixu Xia <kaixuxia@...cent.com>
Subject: [PATCH] perf intel-bts: Use true,false for bool variable

From: Kaixu Xia <kaixuxia@...cent.com>

Fix the following coccinelle reports:

./tools/perf/util/intel-bts.c:472:3-13: WARNING: Assignment of 0/1 to bool variable
./tools/perf/util/intel-bts.c:515:3-13: WARNING: Assignment of 0/1 to bool variable

Reported-by: Tosk Robot <tencent_os_robot@...cent.com>
Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>
---
 tools/perf/util/intel-bts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index af1e78d76228..aa4fad92c79b 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -469,7 +469,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp)
 
 	if (!buffer) {
 		if (!btsq->bts->sampling_mode)
-			btsq->done = 1;
+			btsq->done = true;
 		err = 1;
 		goto out_put;
 	}
@@ -512,7 +512,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp)
 			*timestamp = btsq->buffer->reference;
 	} else {
 		if (!btsq->bts->sampling_mode)
-			btsq->done = 1;
+			btsq->done = true;
 	}
 out_put:
 	thread__put(thread);
-- 
2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ