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

@ -532,7 +532,7 @@ create_constraint(struct wl_listener *listener, void *data)
struct wlr_pointer_constraint_v1 *wlr_constraint = data;
struct server *server = wl_container_of(listener, server,
new_constraint);
struct constraint *constraint = xzalloc(sizeof(struct constraint));
struct constraint *constraint = znew(*constraint);
constraint->constraint = wlr_constraint;
constraint->seat = &server->seat;