mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
This commit is contained in:
parent
a09d649439
commit
1b0694b794
99 changed files with 224 additions and 355 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue