From 2c5acdef3aab52d0a416aee3654a63328847f22e Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 31 Oct 2019 09:04:19 +0100 Subject: [PATCH] xwayland/eglstream: Fix order of `calloc()` args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The definition by the manual is `calloc(size_t nmemb, size_t size)`. Swap the arguments of calloc() calls to match the definition. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/xwayland-glamor-eglstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c index 36b749aaf..c897c74a8 100644 --- a/hw/xwayland/xwayland-glamor-eglstream.c +++ b/hw/xwayland/xwayland-glamor-eglstream.c @@ -910,7 +910,7 @@ xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen) if (!dixRegisterPrivateKey(&xwl_eglstream_private_key, PRIVATE_SCREEN, 0)) return; - xwl_eglstream = calloc(sizeof(*xwl_eglstream), 1); + xwl_eglstream = calloc(1, sizeof(*xwl_eglstream)); if (!xwl_eglstream) { ErrorF("Failed to allocate memory required to init EGLStream support\n"); return;