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 /xwayland/selection | |
parent | a09d6494397bdd28a3254d2e646212afb5a3049c (diff) |
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
Diffstat (limited to 'xwayland/selection')
-rw-r--r-- | xwayland/selection/incoming.c | 6 | ||||
-rw-r--r-- | xwayland/selection/outgoing.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c index 755ce16c..c2e1e712 100644 --- a/xwayland/selection/incoming.c +++ b/xwayland/selection/incoming.c @@ -402,8 +402,7 @@ static void xwm_selection_get_targets(struct wlr_xwm_selection *selection) { struct wlr_xwm *xwm = selection->xwm; if (selection == &xwm->clipboard_selection) { - struct x11_data_source *source = - calloc(1, sizeof(struct x11_data_source)); + struct x11_data_source *source = calloc(1, sizeof(*source)); if (source == NULL) { return; } @@ -421,8 +420,7 @@ static void xwm_selection_get_targets(struct wlr_xwm_selection *selection) { wlr_data_source_destroy(&source->base); } } else if (selection == &xwm->primary_selection) { - struct x11_primary_selection_source *source = - calloc(1, sizeof(struct x11_primary_selection_source)); + struct x11_primary_selection_source *source = calloc(1, sizeof(*source)); if (source == NULL) { return; } diff --git a/xwayland/selection/outgoing.c b/xwayland/selection/outgoing.c index 3e5432f0..d2d0932c 100644 --- a/xwayland/selection/outgoing.c +++ b/xwayland/selection/outgoing.c @@ -269,8 +269,7 @@ static bool xwm_selection_send_data(struct wlr_xwm_selection *selection, return false; } - struct wlr_xwm_selection_transfer *transfer = - calloc(1, sizeof(struct wlr_xwm_selection_transfer)); + struct wlr_xwm_selection_transfer *transfer = calloc(1, sizeof(*transfer)); if (transfer == NULL) { wlr_log(WLR_ERROR, "Allocation failed"); return false; |