replace snprintf with strlcpy

ok oga@
This commit is contained in:
okan 2008-07-11 14:24:34 +00:00
parent 85e6c61360
commit 8be175b175

3
conf.c
View File

@ -194,8 +194,7 @@ conf_setup(struct conf *c, const char *conf_file)
if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG)) if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG))
errx(1, "%s: %s", conf_file, strerror(errno)); errx(1, "%s: %s", conf_file, strerror(errno));
else else
snprintf(c->conf_path, sizeof(c->conf_path), "%s", strlcpy(c->conf_path, conf_file, sizeof(c->conf_path));
conf_file);
conf_init(c); conf_init(c);