Re: [PATCH] video/hdmi: Change strncpy() into memcpy() in hdmi_spd_infoframe_init

2019-01-20 Thread Mathieu Malaterre
On Fri, Jan 18, 2019 at 8:51 PM Joe Perches wrote: > > On Fri, 2019-01-18 at 20:32 +0100, Mathieu Malaterre wrote: > > Using strncpy() is less than perfect since the destination buffers do not > > need to be NUL terminated. Replace strncpy() with memcpy() to address a > > warning triggered by gcc

[PATCH] video/hdmi: Change strncpy() into memcpy() in hdmi_spd_infoframe_init

2019-01-20 Thread Mathieu Malaterre
Using strncpy() is less than perfect since the destination buffers do not need to be NUL terminated. Replace strncpy() with memcpy() to address a warning triggered by gcc using W=1 and optimize the code a bit. This commit removes the following warnings: drivers/video/hdmi.c:234:2: warning: 'str

Re: [PATCH] video/hdmi: Change strncpy() into memcpy() in hdmi_spd_infoframe_init

2019-01-18 Thread Joe Perches
On Fri, 2019-01-18 at 20:32 +0100, Mathieu Malaterre wrote: > Using strncpy() is less than perfect since the destination buffers do not > need to be NUL terminated. Replace strncpy() with memcpy() to address a > warning triggered by gcc using W=1 and optimize the code a bit. > > This commit remove