Source-Changes-HG archive

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

[src/trunk]: src/sbin/savecore Remove an extraneous fclose() call which would...



details:   https://anonhg.NetBSD.org/src/rev/025160c5453a
branches:  trunk
changeset: 474195:025160c5453a
user:      cgd <cgd%NetBSD.org@localhost>
date:      Thu Jul 01 08:53:35 1999 +0000

description:
Remove an extraneous fclose() call which would cause savecore to crash
if the bounds file was unwritable (e.g. because /var was read-only).
Fix supplied by Ronald Khoo in PR#7887.

diffstat:

 sbin/savecore/savecore.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 04cd0b816ba9 -r 025160c5453a sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c  Thu Jul 01 08:12:45 1999 +0000
+++ b/sbin/savecore/savecore.c  Thu Jul 01 08:53:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: savecore.c,v 1.38 1999/02/27 20:40:30 sommerfe Exp $   */
+/*     $NetBSD: savecore.c,v 1.39 1999/07/01 08:53:35 cgd Exp $        */
 
 /*-
  * Copyright (c) 1986, 1992, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)savecore.c 8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: savecore.c,v 1.38 1999/02/27 20:40:30 sommerfe Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.39 1999/07/01 08:53:35 cgd Exp $");
 #endif
 #endif /* not lint */
 
@@ -422,7 +422,6 @@
                (void)fprintf(fp, "%d\n", bounds + 1);
                (void)fclose(fp);
        }
-       (void)fclose(fp);
 
        /* Create the core file. */
        (void)snprintf(path, sizeof(path), "%s/netbsd.%d.core%s",



Home | Main Index | Thread Index | Old Index