From f7224014df0d366453739356b9968ca94ad43979 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 8 Jul 2019 17:14:28 +0100 Subject: [PATCH] radv: replace memset()+strcpy() with snprintf() Just like the next line :) Signed-off-by: Eric Engestrom Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index af7fcb6fcff..a4ec2e4ac16 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1340,9 +1340,7 @@ void radv_GetPhysicalDeviceProperties2( (VkPhysicalDeviceDriverPropertiesKHR *) ext; driver_props->driverID = VK_DRIVER_ID_MESA_RADV_KHR; - memset(driver_props->driverName, 0, VK_MAX_DRIVER_NAME_SIZE_KHR); - strcpy(driver_props->driverName, "radv"); - + snprintf(driver_props->driverName, VK_MAX_DRIVER_NAME_SIZE_KHR, "radv"); snprintf(driver_props->driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR, "Mesa " PACKAGE_VERSION MESA_GIT_SHA1 " (LLVM " MESA_LLVM_VERSION_STRING ")"); -- 2.30.2