summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-03-03 01:03:52 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-03-03 01:03:52 +0000
commit0da9be1378f0e7dc8fca3edc1d0d393cd55c15dc (patch)
tree2cbfe9259c0669a0a35f6eae93c059427f2b3e6c /usr.bin
parenta3cfb583801505d010eb1f7b119143ef08bc6c90 (diff)
fix uninitialized variable; this could have caused problems when installing sparse files
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xinstall/xinstall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index 6efa1844cfe..1dfb3be8b0a 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xinstall.c,v 1.19 1999/01/26 04:09:35 millert Exp $ */
+/* $OpenBSD: xinstall.c,v 1.20 1999/03/03 01:03:51 millert Exp $ */
/* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif
-static char rcsid[] = "$OpenBSD: xinstall.c,v 1.19 1999/01/26 04:09:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: xinstall.c,v 1.20 1999/03/03 01:03:51 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -469,6 +469,7 @@ copy(from_fd, from_name, to_fd, to_name, size, sparse)
sz = S_BLKSIZE;
else
sz = sb.st_blksize;
+ rem = sz;
while ((nr = read(from_fd, buf, sizeof(buf))) > 0) {
if (sparse)