* vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
authorCary Coutant <ccoutant@google.com>
Fri, 20 Feb 2009 18:53:12 +0000 (18:53 +0000)
committerCary Coutant <ccoutant@google.com>
Fri, 20 Feb 2009 18:53:12 +0000 (18:53 +0000)
in struct stat.

bfd/ChangeLog
bfd/vmsutil.c

index 55f1c73e5b09b9592596cc2617941e63b535d44a..32ae0d89dc15d62601a88ae2389bfd314af10781 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-20  Cary Coutant  <ccoutant@google.com>
+
+       * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
+       in struct stat.
+
 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR gas/7059
index 83c4609df419d6e246be644609b41ba5eca64bd0..ff4383a86e2ff0643df25d393e0dc0cdffb666a1 100644 (file)
@@ -237,16 +237,13 @@ vms_file_stats_name (const char *filename,
   return 0;
 #else
   struct stat buff;
-  struct tm *ts;
 
   if ((stat (filename, &buff)) != 0)
      return 1;
 
   if (cdt)
     {
-      ts = localtime (&buff.st_mtime);
-      *cdt = (long long) ((buff.st_mtim.tv_sec * VMS_GRANULARITY_FACTOR)
-                          + (buff.st_mtim.tv_nsec / 100))
+      *cdt = (long long) (buff.st_mtime * VMS_GRANULARITY_FACTOR)
                          + VMS_EPOCH_OFFSET;
     }