Skip to contentSkip to conversation

staging: allegreo-dvt: fix warning of comparison of 0/1 to bool

PATCH In review Jules Irenge 2 participants 2 messages Nov 2, 2019

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

PATCH 1/1 staging: allegreo-dvt: fix warning of comparison of 0/1 to bool

Fix warning of comparison of 0/1 to bool variable. Warning reported by coccinelle tool.

---
 drivers/staging/media/allegro-dvt/nal-h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/allegro-dvt/nal-h264.c +1 -1
index 4e14b77851e1..bd48b8883572 100644
@@ -235,7 +235,7 @@ static inline int rbsp_write_bit(struct rbsp *rbsp, bool value)
 
 	rbsp->pos++;
 
-	if (value == 1 ||
+	if (value ||
 	    (rbsp->num_consecutive_zeros < 7 && (rbsp->pos % 8 == 0))) {
 		rbsp->num_consecutive_zeros = 0;
 	} else {
Signature · 1 line
2.21.0
maintainer
#1 lore raw
Quoted 1 line · Jules Irenge

Fix warning of comparison of 0/1 to bool variable.

Again, this isn't a "warning", but just a coccinelle-noticed recommendation.

thanks,

greg k-h