loader: let compiler figure out the length of the string

Basically, turn comment into code

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Eric Engestrom 2017-12-19 14:12:44 +00:00
parent 57b0ccd178
commit 0663ae0aa1
1 changed files with 1 additions and 2 deletions

View 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) {