Module Name: src
Committed By: bouyer
Date: Wed Oct 17 20:44:14 UTC 2012
Modified Files:
src/bin/pax [netbsd-5]: ftree.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1799):
bin/pax/ftree.c: revision 1.42
deal properly with empty lines in spec file
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.6.1 src/bin/pax/ftree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/ftree.c
diff -u src/bin/pax/ftree.c:1.39 src/bin/pax/ftree.c:1.39.6.1
--- src/bin/pax/ftree.c:1.39 Mon Apr 28 20:22:51 2008
+++ src/bin/pax/ftree.c Wed Oct 17 20:44:14 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ftree.c,v 1.39 2008/04/28 20:22:51 martin Exp $ */
+/* $NetBSD: ftree.c,v 1.39.6.1 2012/10/17 20:44:14 bouyer Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -71,7 +71,7 @@
#if 0
static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ftree.c,v 1.39 2008/04/28 20:22:51 martin Exp $");
+__RCSID("$NetBSD: ftree.c,v 1.39.6.1 2012/10/17 20:44:14 bouyer Exp $");
#endif
#endif /* not lint */
@@ -347,7 +347,7 @@ ftree_arg(void)
* the user didn't supply any args, get the file trees
* to process from stdin;
*/
- for (i = 0; i < PAXPATHLEN + 2; i++) {
+ for (i = 0; i < PAXPATHLEN + 2;) {
c = getchar();
if (c == EOF)
break;
@@ -355,7 +355,7 @@ ftree_arg(void)
if (i != 0)
break;
} else
- farray[0][i] = c;
+ farray[0][i++] = c;
}
if (i == 0)
return -1;