]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - login/programs/utmpdump.c
Update copyright notices with scripts/update-copyrights.
[thirdparty/glibc.git] / login / programs / utmpdump.c
index 225b67a2658d58ea1e1f52427c8714930efd4429..7271b57ba903f31d7a826ca4296057f0304fd470 100644 (file)
@@ -1,5 +1,5 @@
 /* utmpdump - dump utmp-like files.
-   Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
 
@@ -14,9 +14,8 @@
    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 <stdio.h>
 #include <stdlib.h>
@@ -28,16 +27,16 @@ static void
 print_entry (struct utmp *up)
 {
   /* Mixed 32-/64-bit systems may have timeval structs of different sixe
-     but need struct utmp to be the same size.  So in 64-bit up->ut_tv may 
+     but need struct utmp to be the same size.  So in 64-bit up->ut_tv may
      not be a timeval but a struct of __int32_t's.  This would cause a compile
      time warning and a formating error when 32-bit int is passed where
      a 64-bit long is expected. So copy up->up_tv to a temporary timeval.
-     This is 32-/64-bit agnostic and expands the timeval fields to the 
+     This is 32-/64-bit agnostic and expands the timeval fields to the
      expected size as needed. */
   struct timeval temp_tv;
   temp_tv.tv_sec = up->ut_tv.tv_sec;
   temp_tv.tv_usec = up->ut_tv.tv_usec;
+
   (printf) (
            /* The format string.  */
 #if _HAVE_UT_TYPE
@@ -74,7 +73,7 @@ print_entry (struct utmp *up)
 #endif
 #if _HAVE_UT_TV
            , 4 + ctime (&temp_tv.tv_sec)
-           , temp_tv.tv_usec
+           , (long int) temp_tv.tv_usec
 #else
            , 4 + ctime (&up->ut_time)
 #endif