projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57b0ccd
)
loader: let compiler figure out the length of the string
author
Eric Engestrom
<eric.engestrom@imgtec.com>
Tue, 19 Dec 2017 14:12:44 +0000
(14:12 +0000)
committer
Eric Engestrom
<eric.engestrom@imgtec.com>
Thu, 25 Jan 2018 11:40:25 +0000
(11:40 +0000)
Basically, turn comment into code
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/loader/loader.c
patch
|
blob
|
history
diff --git
a/src/loader/loader.c
b/src/loader/loader.c
index 3c67f9dc2448a34dbf8e21341edc94860207a0af..913b3dcac032b3c9cd0ab068874627913f2b45bc 100644
(file)
--- a/
src/loader/loader.c
+++ b/
src/loader/loader.c
@@
-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) {