summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMatthias Kilian <kili@cvs.openbsd.org>2007-09-01 18:13:59 +0000
committerMatthias Kilian <kili@cvs.openbsd.org>2007-09-01 18:13:59 +0000
commitf76ad80f3ec6a9f21691f0ed69bf6c5a2991de17 (patch)
tree95ea40ed81aa7a5e2468bd15d0aaf4d556cd6c90 /usr.bin
parent9422e41fd85a38500b63752658671e5445f46b63 (diff)
Use an int, not a size_t, to store the return value of snprintf().
This gives the later tests against -1 a chance to actually do something. Initially from Igor Zinovik <zinovik@cs.karelia.ru>. ok ray@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sort/init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/sort/init.c b/usr.bin/sort/init.c
index 1b13dd233d6..700b8406979 100644
--- a/usr.bin/sort/init.c
+++ b/usr.bin/sort/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.10 2007/04/02 08:04:52 moritz Exp $ */
+/* $OpenBSD: init.c,v 1.11 2007/09/01 18:13:58 kili Exp $ */
/*-
* Copyright (c) 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.10 2007/04/02 08:04:52 moritz Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.11 2007/09/01 18:13:58 kili Exp $";
#endif
#endif /* not lint */
@@ -215,11 +215,10 @@ optval(int desc, int tcolflag)
void
fixit(int *argc, char **argv)
{
- int i, j;
+ int i, j, n;
long v, w, x;
char *p, *ep;
char buf[128], *bufp, *bufend;
- size_t n;
bufend = buf + sizeof(buf);
for (i = 1; i < *argc; i++) {