Module: Mesa Branch: staging/22.2 Commit: 8b0343601c359edc84003d1aa01fe7a6b3796f29 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b0343601c359edc84003d1aa01fe7a6b3796f29
Author: Jesse Natalie <[email protected]> Date: Wed Aug 10 13:16:45 2022 -0700 egl/wgl: Fix some awkward sizeof formatting Fixes: 3415bf02 ("egl: Add a basic Windows driver") Suggested-by: Mike Blumenkrantz <[email protected]> Acked-by: Daniel Stone <[email protected]> Acked-by: Mike Blumenkrantz <[email protected]> Acked-by: Sidney Just <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964> (cherry picked from commit 17eda68df3b88e5ed02cf180411491b28be1e6d5) --- .pick_status.json | 2 +- src/egl/drivers/wgl/egl_wgl.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 06d1c4f735e..fc8b49652e0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -184,7 +184,7 @@ "description": "egl/wgl: Fix some awkward sizeof formatting", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3415bf0268884bf3c16d495a4e1afd30d67bc71d" }, diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index 362438aed05..c0e7db71ef8 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -135,7 +135,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; @@ -191,7 +191,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"); @@ -354,7 +354,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;
