From 17eda68df3b88e5ed02cf180411491b28be1e6d5 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 10 Aug 2022 13:16:45 -0700 Subject: [PATCH] egl/wgl: Fix some awkward sizeof formatting Fixes: 3415bf02 ("egl: Add a basic Windows driver") Suggested-by: Mike Blumenkrantz Acked-by: Daniel Stone Acked-by: Mike Blumenkrantz Acked-by: Sidney Just Acked-by: Jason Ekstrand Part-of: --- src/egl/drivers/wgl/egl_wgl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index 871f04eaeb6..ccb5957e1f4 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -140,7 +140,7 @@ wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config, return NULL; } else if (num_configs == 0) { - conf = calloc(1, sizeof * conf); + conf = calloc(1, sizeof(*conf)); if (conf == NULL) return NULL; @@ -233,7 +233,7 @@ wgl_initialize_impl(_EGLDisplay *disp, HDC hdc) struct wgl_egl_display *wgl_dpy; const char* err; - wgl_dpy = calloc(1, sizeof * wgl_dpy); + wgl_dpy = calloc(1, sizeof(*wgl_dpy)); if (!wgl_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); @@ -398,7 +398,7 @@ wgl_create_context(_EGLDisplay *disp, _EGLConfig *conf, struct wgl_egl_config *wgl_config = wgl_egl_config(conf); const struct stw_pixelformat_info *stw_config; - wgl_ctx = malloc(sizeof * wgl_ctx); + wgl_ctx = malloc(sizeof(*wgl_ctx)); if (!wgl_ctx) { _eglError(EGL_BAD_ALLOC, "eglCreateContext"); return NULL;