bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

isofs/inode.c: converting from nanoseconds to microseconds


From: Thomas Schwinge
Subject: isofs/inode.c: converting from nanoseconds to microseconds
Date: Sat, 24 Mar 2007 18:13:25 +0100
User-agent: Mutt/1.5.11

Hello!

Either I'm off here, but if I convert a nanosecond value to microseconds,
I divide the value by thousand and don't multiply with thousand.
Correct?


#v+
2007-03-24  Thomas Schwinge  <tschwinge@gnu.org>

        * isofs/inode.c (read_disknode): Correctly convert from nanoseconds to
        microseconds.

Index: isofs/inode.c
===================================================================
RCS file: /cvsroot/hurd/hurd/isofs/inode.c,v
retrieving revision 1.16
diff -u -p -r1.16 inode.c
--- isofs/inode.c       6 Aug 2002 12:33:17 -0000       1.16
+++ isofs/inode.c       24 Mar 2007 17:03:24 -0000
@@ -433,7 +433,7 @@ read_disknode (struct node *np, struct d
       isodate_915 (dr->date, &ts);
       st->st_ctime = st->st_mtime = st->st_atime = ts.tv_sec;
       st->st_ctime_usec = st->st_mtime_usec = st->st_atime_usec
-       = ts.tv_nsec * 1000;
+       = ts.tv_nsec / 1000;
     }
 
   /* Override what we have better info for */
@@ -442,19 +442,19 @@ read_disknode (struct node *np, struct d
       if (rl->tfflags & TF_CREATION)
        {
          st->st_ctime = rl->ctime.tv_sec;
-         st->st_ctime_usec = rl->ctime.tv_nsec * 1000;
+         st->st_ctime_usec = rl->ctime.tv_nsec / 1000;
        }
 
       if (rl->tfflags & TF_ACCESS)
        {
          st->st_atime = rl->atime.tv_sec;
-         st->st_atime_usec = rl->atime.tv_nsec * 1000;
+         st->st_atime_usec = rl->atime.tv_nsec / 1000;
        }
 
       if (rl->tfflags & TF_MODIFY)
        {
          st->st_mtime = rl->mtime.tv_sec;
-         st->st_mtime_usec = rl->mtime.tv_nsec * 1000;
+         st->st_mtime_usec = rl->mtime.tv_nsec / 1000;
        }
     }
 
#v-


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]