Source-Changes-HG archive

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

[src/trunk]: src/dist/nvi/common PR/10367: Second part.



details:   https://anonhg.NetBSD.org/src/rev/3da546738228
branches:  trunk
changeset: 772923:3da546738228
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 21 19:35:02 2012 +0000

description:
PR/10367: Second part.
Restore lost fix:
http://mail-index.netbsd.org/source-changes/2001/09/09/0043.html

Fix a test condition for EOF.

diffstat:

 dist/nvi/common/delete.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 1fdf7669c261 -r 3da546738228 dist/nvi/common/delete.c
--- a/dist/nvi/common/delete.c  Sat Jan 21 19:32:37 2012 +0000
+++ b/dist/nvi/common/delete.c  Sat Jan 21 19:35:02 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: delete.c,v 1.3 2012/01/21 19:29:41 christos Exp $ */
+/*     $NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -65,7 +65,7 @@
                if (tm->lno == lno) {
                        if (db_get(sp, lno, DBG_FATAL, &p, &len))
                                return (1);
-                       eof = tm->cno >= len ? 1 : 0;
+                       eof = tm->cno != -1 && tm->cno >= len ? 1 : 0;
                } else
                        eof = 1;
                if (eof) {



Home | Main Index | Thread Index | Old Index