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 --- backend/multi/backend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'backend/multi') diff --git a/backend/multi/backend.c b/backend/multi/backend.c index 1ee21c14..fccad5b4 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -127,8 +127,7 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) { } struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) { - struct wlr_multi_backend *backend = - calloc(1, sizeof(struct wlr_multi_backend)); + struct wlr_multi_backend *backend = calloc(1, sizeof(*backend)); if (!backend) { wlr_log(WLR_ERROR, "Backend allocation failed"); return NULL; @@ -191,7 +190,7 @@ bool wlr_multi_backend_add(struct wlr_backend *_multi, return true; } - struct subbackend_state *sub = calloc(1, sizeof(struct subbackend_state)); + struct subbackend_state *sub = calloc(1, sizeof(*sub)); if (sub == NULL) { wlr_log(WLR_ERROR, "Could not add backend: allocation failed"); return false; -- cgit v1.2.3