svn commit: trunk/uClibc/libc/misc/utmp

vapier at uclibc.org vapier at uclibc.org
Wed Feb 15 05:58:58 UTC 2006


Author: vapier
Date: 2006-02-14 21:58:57 -0800 (Tue, 14 Feb 2006)
New Revision: 14050

Log:
make sure we reset static_fd after it's closed in utmpname()

Modified:
   trunk/uClibc/libc/misc/utmp/utent.c


Changeset:
Modified: trunk/uClibc/libc/misc/utmp/utent.c
===================================================================
--- trunk/uClibc/libc/misc/utmp/utent.c	2006-02-15 05:53:28 UTC (rev 14049)
+++ trunk/uClibc/libc/misc/utmp/utent.c	2006-02-15 05:58:57 UTC (rev 14050)
@@ -100,9 +100,8 @@
 void endutent(void)
 {
     LOCK;
-    if (static_fd != -1) {
+    if (static_fd != -1)
 	close(static_fd);
-    }
     static_fd = -1;
     UNLOCK;
 }
@@ -192,6 +191,7 @@
 
     if (static_fd != -1)
 	close(static_fd);
+    static_fd = -1;
     UNLOCK;
     return 0;
 }




More information about the uClibc-cvs mailing list