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

@ -28,7 +28,7 @@ parse_modifier(const char *symname)
struct keybind *
keybind_create(const char *keybind)
{
struct keybind *k = xzalloc(sizeof(struct keybind));
struct keybind *k = znew(*k);
xkb_keysym_t keysyms[MAX_KEYSYMS];
gchar **symnames = g_strsplit(keybind, "-", -1);
for (int i = 0; symnames[i]; i++) {