diff options
author | okan <okan> | 2011-07-25 15:10:24 +0000 |
---|---|---|
committer | okan <okan> | 2011-07-25 15:10:24 +0000 |
commit | f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0 (patch) | |
tree | 1fc947a7565944bf2613155ca188c7fda3cbff3c /conf.c | |
parent | 69ac0624cc07ffc8df11287a8827b42773371b0e (diff) | |
download | cwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.tar.gz cwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.tar.xz cwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.zip |
We are inconsistent when it comes to function returns, so just go all
the way with the cwm specific parts. ok oga@
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/conf.c b/conf.c index dc4d0c0..223f621 100644 --- a/conf.c +++ b/conf.c @@ -48,14 +48,14 @@ conf_cmd_add(struct conf *c, char *image, char *label, int flags) /* "term" and "lock" have special meanings. */ if (strcmp(label, "term") == 0) - strlcpy(c->termpath, image, sizeof(c->termpath)); + (void)strlcpy(c->termpath, image, sizeof(c->termpath)); else if (strcmp(label, "lock") == 0) - strlcpy(c->lockpath, image, sizeof(c->lockpath)); + (void)strlcpy(c->lockpath, image, sizeof(c->lockpath)); else { struct cmd *cmd = xmalloc(sizeof(*cmd)); cmd->flags = flags; - strlcpy(cmd->image, image, sizeof(cmd->image)); - strlcpy(cmd->label, label, sizeof(cmd->label)); + (void)strlcpy(cmd->image, image, sizeof(cmd->image)); + (void)strlcpy(cmd->label, label, sizeof(cmd->label)); TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry); } } @@ -199,8 +199,8 @@ conf_init(struct conf *c) conf_mousebind(c, m_binds[i].key, m_binds[i].func); /* Default term/lock */ - strlcpy(c->termpath, "xterm", sizeof(c->termpath)); - strlcpy(c->lockpath, "xlock", sizeof(c->lockpath)); + (void)strlcpy(c->termpath, "xterm", sizeof(c->termpath)); + (void)strlcpy(c->lockpath, "xlock", sizeof(c->lockpath)); c->color[CWM_COLOR_BORDER_ACTIVE].name = xstrdup(CONF_COLOR_ACTIVEBORDER); @@ -273,13 +273,14 @@ conf_setup(struct conf *c, const char *conf_file) if (home == NULL) errx(1, "No HOME directory."); - snprintf(c->conf_path, sizeof(c->conf_path), "%s/%s", home, - CONFFILE); + (void)snprintf(c->conf_path, sizeof(c->conf_path), "%s/%s", + home, CONFFILE); } else if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG)) errx(1, "%s: %s", conf_file, strerror(errno)); else - strlcpy(c->conf_path, conf_file, sizeof(c->conf_path)); + (void)strlcpy(c->conf_path, conf_file, + sizeof(c->conf_path)); conf_init(c); |