Re: [PATCH v5] mlx4: fix a compilation warning in sysfs.c

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

 



On Thu, Nov 29, 2018 at 09:18:07PM -0500, Qian Cai wrote:
> drivers/infiniband/hw/mlx4/sysfs.c:360:2: warning: 'strncpy' output may be
> truncated copying 8 bytes from a string of length 31
> [-Wstringop-truncation]
> 
> Signed-off-by: Qian Cai <cai@xxxxxx>
> ---
> 
> Changes since v4:
> * Fixed the format specifier.
> 
> since v3:
> * Removed an unused variable.
> 
> since v2:
> * Simplified the whole things using snprintf() suggested by Jason.
> 
> since v1:
> * Used strscpy() instead of snprintf()
> * Removed an unnecessary statement.
> 
>  drivers/infiniband/hw/mlx4/sysfs.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)


Applied to for next with a few minor formatting changes

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux