Re: [PATCH] mpi3mr: Fix W=1 compilation warnings

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

 



Sreekanth,

> -	strncpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name));
> -	drv_info->os_name[sizeof(drv_info->os_name) - 1] = 0;
> -	strncpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version));
> -	drv_info->os_version[sizeof(drv_info->os_version) - 1] = 0;
> +	memcpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name) - 1);
> +	memcpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version) - 1);

strscpy()?

-- 
Martin K. Petersen	Oracle Linux Engineering



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux