summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2008-07-11 14:24:34 +0000
committerokan <okan>2008-07-11 14:24:34 +0000
commit8be175b175f04c4c16ec4be63bab6b1d2b0ebbfd (patch)
tree2aad0db8ebf663fb009104f1cdcba6a8e34dd065 /conf.c
parent85e6c613606d444e08a9b1a2d53049c46a57e2a2 (diff)
downloadcwm-8be175b175f04c4c16ec4be63bab6b1d2b0ebbfd.tar.gz
cwm-8be175b175f04c4c16ec4be63bab6b1d2b0ebbfd.tar.xz
cwm-8be175b175f04c4c16ec4be63bab6b1d2b0ebbfd.zip
replace snprintf with strlcpy
ok oga@
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index e586770..10d891a 100644
--- a/conf.c
+++ b/conf.c
@@ -194,8 +194,7 @@ conf_setup(struct conf *c, const char *conf_file)
 		if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG))
 			errx(1, "%s: %s", conf_file, strerror(errno));
 		else
-			snprintf(c->conf_path, sizeof(c->conf_path), "%s",
-			    conf_file);
+			strlcpy(c->conf_path, conf_file, sizeof(c->conf_path));
 
 	conf_init(c);