Source-Changes-HG archive

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

[src/netbsd-2-0]: src/usr.bin/vi/common Pull up revision 1.12 (requested by a...



details:   https://anonhg.NetBSD.org/src/rev/560cbf03c507
branches:  netbsd-2-0
changeset: 560334:560cbf03c507
user:      jdc <jdc%NetBSD.org@localhost>
date:      Thu Apr 08 21:22:46 2004 +0000

description:
Pull up revision 1.12 (requested by aymeric in ticket #100)

Don't fail if asked to recover a file for which there is no recovery file.
Just continue. This matches the man page, the POSIX standard, and even the
comment above that code!
>From OpenBSD, via jmc@openbsd, via wiz@netbsd.
POSIX part confirmed by kleink@netbsd

diffstat:

 usr.bin/vi/common/exf.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d179db93d1f3 -r 560cbf03c507 usr.bin/vi/common/exf.c
--- a/usr.bin/vi/common/exf.c   Thu Apr 08 21:19:46 2004 +0000
+++ b/usr.bin/vi/common/exf.c   Thu Apr 08 21:22:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exf.c,v 1.11 2003/01/06 20:30:41 wiz Exp $     */
+/*     $NetBSD: exf.c,v 1.11.2.1 2004/04/08 21:22:46 jdc Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -16,7 +16,7 @@
 #if 0
 static const char sccsid[] = "@(#)exf.c        10.49 (Berkeley) 10/10/96";
 #else
-__RCSID("$NetBSD: exf.c,v 1.11 2003/01/06 20:30:41 wiz Exp $");
+__RCSID("$NetBSD: exf.c,v 1.11.2.1 2004/04/08 21:22:46 jdc Exp $");
 #endif
 #endif /* not lint */
 
@@ -154,7 +154,8 @@
         */
        if (F_ISSET(frp, FR_RECOVER)) {
                F_CLR(frp, FR_RECOVER);
-               return (rcv_read(sp, frp));
+               if (rcv_read(sp, frp) == 0)
+                       return 0;
        }
 
        /*



Home | Main Index | Thread Index | Old Index