]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - login/utmpname.c
Merge mktime, timegm from upstream Gnulib
[thirdparty/glibc.git] / login / utmpname.c
index 875dbd59732aeb0c5ea28a61a7c2244ded28b8f4..21cb890a1a2fdc923837df1a6f40976b01419cdc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
 
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
 #include <stdlib.h>
 #include <string.h>
 #include <utmp.h>
@@ -50,8 +49,7 @@ __utmpname (const char *file)
     {
       if (strcmp (file, default_file_name) == 0)
        {
-         if (__libc_utmp_file_name != default_file_name)
-           free ((char *) __libc_utmp_file_name);
+         free ((char *) __libc_utmp_file_name);
 
          __libc_utmp_file_name = default_file_name;
        }