aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorokan2011-07-25 15:10:24 +0000
committerokan2011-07-25 15:10:24 +0000
commit02915d130c044aa89ceff108b868c705856a35ca (patch)
tree819b08241dca0050a75a5ec1af2cc17fb98d8382 /conf.c
parent1ef8b9886258d857d0c25c9ab2f5220b4acb8065 (diff)
downloadcwm-02915d130c044aa89ceff108b868c705856a35ca.tar.gz
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 '')
-rw-r--r--conf.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/conf.c b/conf.c
index 1066c49..63dae30 100644
--- a/conf.c
+++ b/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: conf.c,v 1.87 2011/07/14 11:39:53 okan Exp $
+ * $OpenBSD: conf.c,v 1.88 2011/07/25 15:10:24 okan Exp $
*/
#include <sys/param.h>
@@ -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);