treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical

This commit is contained in:
Alexander Orzechowski 2023-10-03 01:51:07 -04:00
parent a09d649439
commit 1b0694b794
99 changed files with 224 additions and 355 deletions

View file

@ -22,8 +22,7 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad,
struct libinput_device *device, unsigned int index) {
struct libinput_tablet_pad_mode_group *li_group =
libinput_device_tablet_pad_get_mode_group(device, index);
struct wlr_tablet_pad_group *group =
calloc(1, sizeof(struct wlr_tablet_pad_group));
struct wlr_tablet_pad_group *group = calloc(1, sizeof(*group));
if (!group) {
wlr_log_errno(WLR_ERROR, "failed to allocate wlr_tablet_pad_group");
return;