Module Name: src
Committed By: dholland
Date: Thu Aug 6 17:55:18 UTC 2009
Modified Files:
src/games/dm: dm.c
Log Message:
Don't use a FILE * after fclose(). PR 41832 from Henning Petersen.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/games/dm/dm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/dm/dm.c
diff -u src/games/dm/dm.c:1.26 src/games/dm/dm.c:1.27
--- src/games/dm/dm.c:1.26 Sun Jul 20 01:03:21 2008
+++ src/games/dm/dm.c Thu Aug 6 17:55:18 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dm.c,v 1.26 2008/07/20 01:03:21 lukem Exp $ */
+/* $NetBSD: dm.c,v 1.27 2009/08/06 17:55:18 dholland Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dm.c,v 1.26 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: dm.c,v 1.27 2009/08/06 17:55:18 dholland Exp $");
#endif
#endif /* not lint */
@@ -316,8 +316,8 @@
else
fprintf(lp, "%u", uid);
fprintf(lp, "\t%s\t%s\t%s", game, gametty, ctime(&now));
- (void)fclose(lp);
(void)flock(fileno(lp), LOCK_UN);
+ (void)fclose(lp);
}
}
#endif /* LOG */