Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/f4c7608098c1
branches:  trunk
changeset: 750881:f4c7608098c1
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Jan 17 23:09:02 2010 +0000

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

diffstat:

 lib/libc/gmon/gmon.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 5c776dc0bbd8 -r f4c7608098c1 lib/libc/gmon/gmon.c
--- a/lib/libc/gmon/gmon.c      Sun Jan 17 23:06:31 2010 +0000
+++ b/lib/libc/gmon/gmon.c      Sun Jan 17 23:09:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gmon.c,v 1.30 2009/02/12 04:57:46 lukem Exp $  */
+/*     $NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $    */
 
 /*
  * Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #if 0
 static char sccsid[] = "@(#)gmon.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: gmon.c,v 1.30 2009/02/12 04:57:46 lukem Exp $");
+__RCSID("$NetBSD: gmon.c,v 1.31 2010/01/17 23:09:02 wiz Exp $");
 #endif
 #endif
 
@@ -481,6 +481,9 @@
                }
        }
        close(fd);
+#ifdef DEBUG
+       close(logfd);
+#endif
 }
 
 /*



Home | Main Index | Thread Index | Old Index