summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2019-08-14 12:04:42 -0400
committerAdam Jackson <[email protected]>2019-08-20 14:04:59 -0400
commit97d58eabcc87d9b66b5837eeae0ce1174d29f448 (patch)
tree9d69afc7b02bd0785f0a3b2b5aa46da9837aa599 /src/glx
parentcabd09c9e70f7fcd5cc5059bbc48428f223df838 (diff)
glx: convert a malloc+memset to calloc
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glxconfig.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 555ccf8e62b..87a02fa9b6b 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -225,14 +225,13 @@ glx_config_create_list(unsigned count)
next = &base;
for (i = 0; i < count; i++) {
- *next = malloc(size);
+ *next = calloc(1, size);
if (*next == NULL) {
glx_config_destroy_list(base);
base = NULL;
break;
}
- (void) memset(*next, 0, size);
(*next)->visualID = GLX_DONT_CARE;
(*next)->visualType = GLX_DONT_CARE;
(*next)->visualRating = GLX_NONE;