radv: drop unnecessary memset() before snprintf()
authorEric Engestrom <eric.engestrom@intel.com>
Mon, 8 Jul 2019 16:12:39 +0000 (17:12 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Sun, 21 Jul 2019 09:38:17 +0000 (10:38 +0100)
snprintf() always terminates the string.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index 8dd24cb8192561609274ce67c59d5aa67770f500..af7fcb6fcff200af4e6212a124dc0ed512d6efbb 100644 (file)
@@ -1343,7 +1343,6 @@ void radv_GetPhysicalDeviceProperties2(
                        memset(driver_props->driverName, 0, VK_MAX_DRIVER_NAME_SIZE_KHR);
                        strcpy(driver_props->driverName, "radv");
 
-                       memset(driver_props->driverInfo, 0, VK_MAX_DRIVER_INFO_SIZE_KHR);
                        snprintf(driver_props->driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR,
                                "Mesa " PACKAGE_VERSION MESA_GIT_SHA1
                                " (LLVM " MESA_LLVM_VERSION_STRING ")");