Mesa (master): zink: do not open-code CALLOC_STRUCT

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 5 15:41:15 UTC 2021


Module: Mesa
Branch: master
Commit: cd7d8eade258e0a9883f6e75065c148d03987206
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd7d8eade258e0a9883f6e75065c148d03987206

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Dec 15 10:38:34 2020 +0100

zink: do not open-code CALLOC_STRUCT

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099>

---

 src/gallium/drivers/zink/zink_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 46c266b90f7..20521d59e92 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -222,7 +222,7 @@ zink_create_sampler_state(struct pipe_context *pctx,
       sci.anisotropyEnable = VK_TRUE;
    }
 
-   struct zink_sampler_state *sampler = CALLOC(1, sizeof(struct zink_sampler_state));
+   struct zink_sampler_state *sampler = CALLOC_STRUCT(zink_sampler_state);
    if (!sampler)
       return NULL;
 



More information about the mesa-commit mailing list