common: Add znew/znew_n() macros

This commit is contained in:
John Lindgren 2022-09-18 15:22:26 -04:00
parent da57483961
commit a54d378e6c
26 changed files with 47 additions and 47 deletions

View file

@ -19,7 +19,7 @@ add_extent(struct wl_list *part_list, enum ssd_part_type type,
* part->geometry will get free'd automatically in ssd_destroy_parts().
*/
part->node = &wlr_scene_rect_create(parent, 0, 0, invisible)->node;
part->geometry = xzalloc(sizeof(struct wlr_box));
part->geometry = znew(struct wlr_box);
return part;
}