Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gdtoa Close file handle after using it. Found by cp...



details:   https://anonhg.NetBSD.org/src/rev/5c776dc0bbd8
branches:  trunk
changeset: 750880:5c776dc0bbd8
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Jan 17 23:06:31 2010 +0000

description:
Close file handle after using it. Found by cppcheck.

diffstat:

 lib/libc/gdtoa/arithchk.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 30bc04a1e14f -r 5c776dc0bbd8 lib/libc/gdtoa/arithchk.c
--- a/lib/libc/gdtoa/arithchk.c Sun Jan 17 23:03:01 2010 +0000
+++ b/lib/libc/gdtoa/arithchk.c Sun Jan 17 23:06:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arithchk.c,v 1.2 2006/01/25 15:27:42 kleink Exp $ */
+/* $NetBSD: arithchk.c,v 1.3 2010/01/17 23:06:31 wiz Exp $ */
 
 /****************************************************************
 Copyright (C) 1997, 1998 Lucent Technologies
@@ -178,8 +178,14 @@
                        fprintf(f, "#define NO_LONG_LONG\n");
                if (a->kind <= 2 && fzcheck())
                        fprintf(f, "#define Sudden_Underflow\n");
+#ifdef WRITE_ARITH_H
+               fclose(f);
+#endif
                return 0;
                }
        fprintf(f, "/* Unknown arithmetic */\n");
+#ifdef WRITE_ARITH_H
+       fclose(f);
+#endif
        return 1;
        }



Home | Main Index | Thread Index | Old Index