diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-25 23:22:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-25 23:22:22 +0000 |
commit | 43901813fe07caab59abb8d89ef34c4dc689c0c4 (patch) | |
tree | c9793eba8ad3346ed9b6aad6de8d25bf6b12871d | |
parent | fc332affd3f44977d88794491335d0f803ecbbc8 (diff) |
sprintf bye bye
-rw-r--r-- | usr.bin/xlint/xlint/xlint.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index ded968ade93..58aa70704ea 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xlint.c,v 1.13 2003/04/14 03:03:53 deraadt Exp $ */ +/* $OpenBSD: xlint.c,v 1.14 2003/04/25 23:22:21 deraadt Exp $ */ /* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: xlint.c,v 1.13 2003/04/14 03:03:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: xlint.c,v 1.14 2003/04/25 23:22:21 deraadt Exp $"; #endif #include <sys/param.h> @@ -294,7 +294,7 @@ main(argc, argv) { int c; char flgbuf[3], *tmp, *s; - size_t len; + size_t len, l; struct utsname un; if ((tmp = getenv("TMPDIR")) == NULL || (len = strlen(tmp)) == 0) { @@ -440,8 +440,9 @@ main(argc, argv) usage(); Cflag = 1; appstrg(&l2flags, concat2("-C", optarg)); - p2out = xmalloc(sizeof ("llib-l.ln") + strlen(optarg)); - (void)sprintf(p2out, "llib-l%s.ln", optarg); + l = sizeof ("llib-l.ln") + strlen(optarg); + p2out = xmalloc(l); + (void)snprintf(p2out, l, "llib-l%s.ln", optarg); freelst(&deflibs); break; |