diff options
author | okan | 2008-07-11 14:24:34 +0000 |
---|---|---|
committer | okan | 2008-07-11 14:24:34 +0000 |
commit | 5f9e4ce44645e6d431d71a004550c38b08e03525 (patch) | |
tree | 599361ffe342031d72e9a41706cb3bb1b891dc9b | |
parent | bb41e9648d15c073d4113236dccee461978f2082 (diff) | |
download | cwm-5f9e4ce44645e6d431d71a004550c38b08e03525.tar.gz |
replace snprintf with strlcpy
ok oga@
-rw-r--r-- | conf.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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. * - * $Id: conf.c,v 1.47 2008/07/11 14:21:28 okan Exp $ + * $Id: conf.c,v 1.48 2008/07/11 14:24:34 okan Exp $ */ #include "headers.h" @@ -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); |