Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax deal properly with empty lines in spec file



details:   https://anonhg.NetBSD.org/src/rev/80e2347e7aed
branches:  trunk
changeset: 781742:80e2347e7aed
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 27 00:44:59 2012 +0000

description:
deal properly with empty lines in spec file

diffstat:

 bin/pax/ftree.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r d071c526a88a -r 80e2347e7aed bin/pax/ftree.c
--- a/bin/pax/ftree.c   Thu Sep 27 00:39:47 2012 +0000
+++ b/bin/pax/ftree.c   Thu Sep 27 00:44:59 2012 +0000
@@ -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 @@
                         * 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 @@
                                        if (i != 0)
                                                break;
                                } else
-                                       farray[0][i] = c;
+                                       farray[0][i++] = c;
                        }
                        if (i == 0)
                                return -1;



Home | Main Index | Thread Index | Old Index