Skip to contentSkip to conversation

perf intel-bts: use true for bool variables

PATCH New Zou Wei 1 participant 1 message Nov 9, 2020 perf events

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 perf intel-bts: use true for bool variables

Fix coccicheck warnings:

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

---
 tools/perf/util/intel-bts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/intel-bts.c +2 -2
index af1e78d..aa4fad9 100644
@@ -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);
Signature · 1 line
2.6.2