diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-10-03 01:51:07 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-10-03 01:51:07 -0400 |
commit | 1b0694b79481643cb456d03e1be50a1b4f6ca591 (patch) | |
tree | c693c5de3ee7ebd52873f6ec063118408f0bd28a /backend/multi | |
parent | a09d6494397bdd28a3254d2e646212afb5a3049c (diff) |
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
Diffstat (limited to 'backend/multi')
-rw-r--r-- | backend/multi/backend.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |