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

@ -109,7 +109,7 @@ mousebind_create(const char *context)
wlr_log(WLR_ERROR, "mousebind context not specified");
return NULL;
}
struct mousebind *m = xzalloc(sizeof(struct mousebind));
struct mousebind *m = znew(*m);
m->context = context_from_str(context);
if (m->context != LAB_SSD_NONE) {
wl_list_insert(rc.mousebinds.prev, &m->link);