Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/unifdef PR/47068: unifdef(1) with cpp directive on l...



details:   https://anonhg.NetBSD.org/src/rev/4d967abf1faf
branches:  trunk
changeset: 782046:4d967abf1faf
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 13 18:26:03 2012 +0000

description:
PR/47068: unifdef(1) with cpp directive on last line without newline
Remove bogus test; if there is no newline, the state does not change.

diffstat:

 usr.bin/unifdef/unifdef.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r fd89758fb31d -r 4d967abf1faf usr.bin/unifdef/unifdef.c
--- a/usr.bin/unifdef/unifdef.c Sat Oct 13 18:14:09 2012 +0000
+++ b/usr.bin/unifdef/unifdef.c Sat Oct 13 18:26:03 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unifdef.c,v 1.21 2012/02/29 23:35:10 joerg Exp $       */
+/*     $NetBSD: unifdef.c,v 1.22 2012/10/13 18:26:03 christos Exp $    */
 
 /*
  * Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@
 #endif
 #ifdef __IDSTRING
 __IDSTRING(Berkeley, "@(#)unifdef.c    8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.21 2012/02/29 23:35:10 joerg Exp $");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.22 2012/10/13 18:26:03 christos Exp $");
 __IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $");
 #endif
 #endif /* not lint */
@@ -655,9 +655,6 @@
                        if (incomment)
                                linestate = LS_DIRTY;
                }
-               /* skipcomment should have changed the state */
-               if (linestate == LS_HASH)
-                       abort(); /* bug */
        }
        if (linestate == LS_DIRTY) {
                while (*cp != '\0')



Home | Main Index | Thread Index | Old Index