summaryrefslogtreecommitdiff
path: root/usr.bin/xargs/strnsubst.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-12-01 05:52:21 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-12-01 05:52:21 +0000
commitd9e8fc3e42628da13418830baf2b1c9eb0b34682 (patch)
tree7df8e824031de0b7a338dd581ad0339a2eba8c39 /usr.bin/xargs/strnsubst.c
parentb007a71484dc05a66ac55b168b82b3a7adbaaebe (diff)
lint makes it easy to find these really bad ones, like size_t n = snprintf
Diffstat (limited to 'usr.bin/xargs/strnsubst.c')
-rw-r--r--usr.bin/xargs/strnsubst.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/xargs/strnsubst.c b/usr.bin/xargs/strnsubst.c
index fddc9352147..7d283fd4f04 100644
--- a/usr.bin/xargs/strnsubst.c
+++ b/usr.bin/xargs/strnsubst.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strnsubst.c,v 1.3 2005/11/01 04:52:58 deraadt Exp $ */
+/* $OpenBSD: strnsubst.c,v 1.4 2005/12/01 05:52:20 cloder Exp $ */
/* $FreeBSD: strnsubst.c,v 1.6 2002/06/22 12:58:42 jmallett Exp $ */
/*
@@ -10,7 +10,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: strnsubst.c,v 1.3 2005/11/01 04:52:58 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: strnsubst.c,v 1.4 2005/12/01 05:52:20 cloder Exp $";
#endif /* not lint */
#include <err.h>
@@ -35,7 +35,8 @@ void
strnsubst(char **str, const char *match, const char *replstr, size_t maxsize)
{
char *s1, *s2, *this;
- size_t matchlen, repllen, s2len, n;
+ size_t matchlen, repllen, s2len;
+ int n;
if ((s1 = *str) == NULL)
return;