mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-22 05:34:24 -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
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue