From 1b0694b79481643cb456d03e1be50a1b4f6ca591 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Tue, 3 Oct 2023 01:51:07 -0400 Subject: treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical --- render/wlr_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render/wlr_renderer.c') diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 2c05aa43..523079a8 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -252,7 +252,7 @@ static int open_drm_render_node(void) { wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len)); return -1; } - drmDevice **devices = calloc(devices_len, sizeof(drmDevice *)); + drmDevice **devices = calloc(devices_len, sizeof(*devices)); if (devices == NULL) { wlr_log_errno(WLR_ERROR, "Allocation failed"); return -1; -- cgit v1.2.3