diff options
author | okan <okan> | 2009-06-20 00:22:39 +0000 |
---|---|---|
committer | okan <okan> | 2009-06-20 00:22:39 +0000 |
commit | 58d12134b1679a9172a7131abffc27769780b9c5 (patch) | |
tree | ffd2aa13b869b39db64f2a18488c87bfc2aa9882 /conf.c | |
parent | 18c7d89c985cda7a9a5fa7de7c13ae177509380b (diff) | |
download | cwm-58d12134b1679a9172a7131abffc27769780b9c5.tar.gz cwm-58d12134b1679a9172a7131abffc27769780b9c5.tar.xz cwm-58d12134b1679a9172a7131abffc27769780b9c5.zip |
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@
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/conf.c b/conf.c index a09d061..3161f8a 100644 --- a/conf.c +++ b/conf.c @@ -41,8 +41,7 @@ conf_cmd_add(struct conf *c, char *image, char *label, int flags) else if (strcmp(label, "lock") == 0) strlcpy(c->lockpath, image, sizeof(c->lockpath)); else { - struct cmd *cmd; - XMALLOC(cmd, struct cmd); + struct cmd *cmd = xmalloc(sizeof(*cmd)); cmd->flags = flags; strlcpy(cmd->image, image, sizeof(cmd->image)); strlcpy(cmd->label, label, sizeof(cmd->label)); @@ -429,7 +428,7 @@ conf_bindname(struct conf *c, char *name, char *binding) char *substring; int iter; - XCALLOC(current_binding, struct keybinding); + current_binding = xcalloc(1, sizeof(*current_binding)); if (strchr(name, 'C') != NULL && strchr(name, 'C') < strchr(name, '-')) @@ -541,7 +540,7 @@ conf_mousebind(struct conf *c, char *name, char *binding) const char *errstr; int iter; - XCALLOC(current_binding, struct mousebinding); + current_binding = xcalloc(1, sizeof(*current_binding)); if (strchr(name, 'C') != NULL && strchr(name, 'C') < strchr(name, '-')) |