aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-10-03 01:51:07 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-10-03 01:51:07 -0400
commit1b0694b79481643cb456d03e1be50a1b4f6ca591 (patch)
treec693c5de3ee7ebd52873f6ec063118408f0bd28a /backend/x11
parenta09d6494397bdd28a3254d2e646212afb5a3049c (diff)
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/input_device.c2
-rw-r--r--backend/x11/output.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c
index f2966a22..b3bd77da 100644
--- a/backend/x11/input_device.c
+++ b/backend/x11/input_device.c
@@ -232,7 +232,7 @@ void handle_x11_xinput_event(struct wlr_x11_backend *x11,
id = last_touchpoint->wayland_id + 1;
}
- struct wlr_x11_touchpoint *touchpoint = calloc(1, sizeof(struct wlr_x11_touchpoint));
+ struct wlr_x11_touchpoint *touchpoint = calloc(1, sizeof(*touchpoint));
touchpoint->x11_id = ev->detail;
touchpoint->wayland_id = id;
wl_list_init(&touchpoint->link);
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;
}