OSDN Git Service

staging: media: allegro-dvt: remove bool comparison
authorCristiane Naves <cristianenavescardoso09@gmail.com>
Sat, 26 Oct 2019 23:16:19 +0000 (20:16 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Oct 2019 07:15:43 +0000 (08:15 +0100)
Bool tests don't need comparisons. Issue found by coccicheck.

Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com>
Link: https://lore.kernel.org/r/20191026231619.GA14093@cristiane-Inspiron-5420
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/allegro-dvt/nal-h264.c

index 4e14b77..bd48b88 100644 (file)
@@ -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 {