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/x11/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/x11/output.c') diff --git a/backend/x11/output.c b/backend/x11/output.c index 553f56a8..f5dc527c 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -256,7 +256,7 @@ static struct wlr_x11_buffer *create_x11_buffer(struct wlr_x11_output *output, return NULL; } - struct wlr_x11_buffer *buffer = calloc(1, sizeof(struct wlr_x11_buffer)); + struct wlr_x11_buffer *buffer = calloc(1, sizeof(*buffer)); if (!buffer) { xcb_free_pixmap(x11->xcb, pixmap); return NULL; @@ -535,7 +535,7 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { return NULL; } - struct wlr_x11_output *output = calloc(1, sizeof(struct wlr_x11_output)); + struct wlr_x11_output *output = calloc(1, sizeof(*output)); if (output == NULL) { return NULL; } -- cgit v1.2.3