Module Name: src
Committed By: christos
Date: Thu Sep 27 00:44:59 UTC 2012
Modified Files:
src/bin/pax: ftree.c
Log Message:
deal properly with empty lines in spec file
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 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.41 src/bin/pax/ftree.c:1.42
--- src/bin/pax/ftree.c:1.41 Tue Mar 20 14:42:28 2012
+++ src/bin/pax/ftree.c Wed Sep 26 20:44:59 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ftree.c,v 1.41 2012/03/20 18:42:28 matt Exp $ */
+/* $NetBSD: ftree.c,v 1.42 2012/09/27 00:44:59 christos 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.41 2012/03/20 18:42:28 matt Exp $");
+__RCSID("$NetBSD: ftree.c,v 1.42 2012/09/27 00:44:59 christos 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;