mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
unroll XCALLOC/XMALLOC macros; since we use xcalloc/xmalloc all over the
place anyway, this makes things a bit more consistent; from Thomas Pfaff ok oga@
This commit is contained in:
@@ -234,7 +234,7 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
|
||||
if (wname == NULL)
|
||||
continue;
|
||||
|
||||
XCALLOC(mi, struct menu);
|
||||
mi = xcalloc(1, sizeof(*mi));
|
||||
strlcpy(mi->text, wname, sizeof(mi->text));
|
||||
mi->ctx = cc;
|
||||
TAILQ_INSERT_TAIL(&menuq, mi, entry);
|
||||
@@ -268,7 +268,7 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
|
||||
|
||||
TAILQ_INIT(&menuq);
|
||||
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
|
||||
XCALLOC(mi, struct menu);
|
||||
mi = xcalloc(1, sizeof(*mi));
|
||||
strlcpy(mi->text, cmd->label, sizeof(mi->text));
|
||||
mi->ctx = cmd;
|
||||
TAILQ_INSERT_TAIL(&menuq, mi, entry);
|
||||
|
||||
Reference in New Issue
Block a user