Re: [PATCH] media: pt1: fix strncmp() size warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 5, 2018 at 2:33 PM, Mauro Carvalho Chehab
<mchehab+samsung@xxxxxxxxxx> wrote:
> As warned by smatch:
>         drivers/media/pci/pt1/pt1.c:213 config_demod() error: strncmp() '"tc90522sat"' too small (11 vs 20)
>
> Use the same strncmp() syntax as pt1_init_frontends() does.

> +       is_sat = !strncmp(cl->name, TC90522_I2C_DEV_SAT,
> +                         strlen(TC90522_I2C_DEV_SAT));

In this case I don't see a point to use strNcmp(). Plain strcmp() would work.


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux