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

@ -68,8 +68,7 @@ xdg_popup_create(struct view *view, struct wlr_xdg_popup *wlr_popup)
return;
}
struct xdg_popup *popup = xzalloc(sizeof(struct xdg_popup));
struct xdg_popup *popup = znew(*popup);
popup->parent_view = view;
popup->wlr_popup = wlr_popup;