loader: let compiler figure out the length of the string
[mesa.git] / src / loader / loader.c
index 3c67f9dc2448a34dbf8e21341edc94860207a0af..913b3dcac032b3c9cd0ab068874627913f2b45bc 100644 (file)
@@ -110,8 +110,7 @@ static char *loader_get_dri_config_device_id(void)
 
 static char *drm_construct_id_path_tag(drmDevicePtr device)
 {
-/* Length of "pci-xxxx_xx_xx_x\0" */
-#define PCI_ID_PATH_TAG_LENGTH 17
+#define PCI_ID_PATH_TAG_LENGTH sizeof("pci-xxxx_xx_xx_x")
    char *tag = NULL;
 
    if (device->bustype == DRM_BUS_PCI) {