mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: POSIX does not have a strlcpy
So don't use it in common code. This could be implemented in common code but it would just be a wrapper around strncpy() most likely since we aren't going to maintain low level (possibly asm) implementations of APIs. NVGPU-525 Signed-off-by: Alex Waterman <alexw@nvidia.com> Change-Id: If446589cd1736456184daa75ae539c4ce332b741 Reviewed-on: https://git-master.nvidia.com/r/1658300 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2780ae27fa
commit
98e87ca10c
@@ -156,7 +156,8 @@ int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
|
||||
a->priv = priv;
|
||||
a->debug = dbg;
|
||||
|
||||
strlcpy(a->name, name, sizeof(a->name));
|
||||
strncpy(a->name, name, sizeof(a->name));
|
||||
a->name[sizeof(a->name) - 1] = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user