Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/vi/common Exit the file_init "recursion" only if we ...



details:   https://anonhg.NetBSD.org/src/rev/d3d22ca6d391
branches:  trunk
changeset: 521965:d3d22ca6d391
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Feb 09 19:33:53 2002 +0000

description:
Exit the file_init "recursion" only if we are actually already trying for
a second time. Checking for the plain temp filename was not enough,
as it may be set even though we are calling the function for the
first time.

fixes bin/15474 by Chuck Cranor

diffstat:

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

diffs (18 lines):

diff -r 8298706814cf -r d3d22ca6d391 usr.bin/vi/common/exf.c
--- a/usr.bin/vi/common/exf.c   Sat Feb 09 18:08:44 2002 +0000
+++ b/usr.bin/vi/common/exf.c   Sat Feb 09 19:33:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exf.c,v 1.6 2002/01/13 11:57:38 aymeric Exp $  */
+/*     $NetBSD: exf.c,v 1.7 2002/02/09 19:33:53 pooka Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -187,7 +187,7 @@
                /*
                 * Don't try to create a temporary support file twice.
                 */
-               if (frp->tname != NULL)
+               if (frp->tname != NULL && LF_ISSET(FS_OPENERR))
                        goto err;
                if (opts_empty(sp, O_DIRECTORY, 0))
                        goto err;



Home | Main Index | Thread Index | Old Index