summaryrefslogtreecommitdiff
path: root/usr.bin/size
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-15 15:54:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-15 15:54:08 +0000
commit959d062b4894ae7803f0a3fc94c002495dc7292d (patch)
tree37516c4e9fbdaf0fece6a67cdbf9bbe21dfc22d3 /usr.bin/size
parentcb39b90a840cce374ba77e375d9b3f150d419041 (diff)
kill a += snprintf
Diffstat (limited to 'usr.bin/size')
-rw-r--r--usr.bin/size/size.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c
index c1b5b221a53..95bd572f472 100644
--- a/usr.bin/size/size.c
+++ b/usr.bin/size/size.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: size.c,v 1.16 2003/04/08 00:53:55 deraadt Exp $ */
+/* $OpenBSD: size.c,v 1.17 2003/04/15 15:54:07 deraadt Exp $ */
/* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93";
#endif
-static char rcsid[] = "$OpenBSD: size.c,v 1.16 2003/04/08 00:53:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: size.c,v 1.17 2003/04/15 15:54:07 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -203,8 +203,10 @@ show_archive(count, fname, fp)
* on each output line
*/
p = name;
- if (count > 1)
- p += snprintf(name, baselen - 1, "%s:", fname);
+ if (count > 1) {
+ snprintf(name, baselen - 1, "%s:", fname);
+ p += strlen(name);
+ }
#ifdef AR_EFMT1
/*
* BSD 4.4 extended AR format: #1/<namelen>, with name as the