Skip to contentSkip to conversation

media: vicodec: vicodec-core.c: fix assignment of 0/1 to bool variable

PATCH In review Daniel W. S. Almeida 1 participant 1 message Aug 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/20 media: vicodec: vicodec-core.c: fix assignment of 0/1 to bool variable

From: "Daniel W. S. Almeida" <[email protected]>

Fix the following coccinelle reports:

drivers/media/test-drivers/vicodec/vicodec-core.c:1674:2-21:
WARNING: Assignment of 0/1 to bool variable

drivers/media/test-drivers/vicodec/vicodec-core.c:1675:2-26:
WARNING: Assignment of 0/1 to bool variable

By replacing the assignment to 0 with 'false' instead.

Found using - Coccinelle (http://coccinelle.lip6.fr)

---
 drivers/media/test-drivers/vicodec/vicodec-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/test-drivers/vicodec/vicodec-core.c +2 -2
index 8941d73f6611..e4a8d3a5eecd 100644
@@ -1671,8 +1671,8 @@ static void vicodec_stop_streaming(struct vb2_queue *q)
 		ctx->comp_size = 0;
 		ctx->header_size = 0;
 		ctx->comp_magic_cnt = 0;
-		ctx->comp_has_frame = 0;
-		ctx->comp_has_next_frame = 0;
+		ctx->comp_has_frame = false;
+		ctx->comp_has_next_frame = false;
 	}
 }
 
Signature · 1 line
2.28.0