Source-Changes-HG archive

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

[src/trunk]: src/games/sail Close file when finished with it. Found by cppcheck.



details:   https://anonhg.NetBSD.org/src/rev/1b6286b64e1c
branches:  trunk
changeset: 750877:1b6286b64e1c
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Jan 17 22:56:32 2010 +0000

description:
Close file when finished with it. Found by cppcheck.

diffstat:

 games/sail/lo_main.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ac515354e476 -r 1b6286b64e1c games/sail/lo_main.c
--- a/games/sail/lo_main.c      Sun Jan 17 22:55:20 2010 +0000
+++ b/games/sail/lo_main.c      Sun Jan 17 22:56:32 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $    */
+/*     $NetBSD: lo_main.c,v 1.18 2010/01/17 22:56:32 wiz Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)lo_main.c  8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $");
+__RCSID("$NetBSD: lo_main.c,v 1.18 2010/01/17 22:56:32 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -92,6 +92,7 @@
                        title[n++], sbuf, ship->shipname, log.l_netpoints,
                        (float) log.l_netpoints / ship->specs->pts);
        }
+       fclose(fp);
        printf("\n%d people have played.\n", npeople);
        return 0;
 }



Home | Main Index | Thread Index | Old Index