summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-05-01 19:40:31 +0100
committerEmil Velikov <[email protected]>2017-05-04 18:05:47 +0100
commitb6643095bab360b9e49a2c8b0f1c97f7e27d84ce (patch)
treeda1ed389439b65cd3081adcabbfac1f5322ef45d /src
parent2c60bf093e9c860e7bdadb17a0063d19b3b39ddb (diff)
eg: explicitly size dri2_to_egl_attribute_map[]
This way we'll get an implicit zero initialization of the remaining members, as required by dri2_add_config(). Fixes: e5efaeb85c3 ("egl: polish dri2_to_egl_attribute_map[]") Cc: Tomasz Figa <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 91456b025d5..0be7132ac58 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -102,7 +102,7 @@ const __DRIuseInvalidateExtension use_invalidate = {
.base = { __DRI_USE_INVALIDATE, 1 }
};
-static const EGLint dri2_to_egl_attribute_map[] = {
+static const EGLint dri2_to_egl_attribute_map[__DRI_ATTRIB_MAX] = {
[__DRI_ATTRIB_BUFFER_SIZE ] = EGL_BUFFER_SIZE,
[__DRI_ATTRIB_LEVEL] = EGL_LEVEL,
[__DRI_ATTRIB_RED_SIZE] = EGL_RED_SIZE,