viced: Make use of unused variable
authorMarc Dionne <marc.c.dionne@gmail.com>
Tue, 4 Sep 2012 21:09:00 +0000 (17:09 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 5 Sep 2012 02:38:54 +0000 (19:38 -0700)
Commit c2d724dc introduced the now variable that was set but never
used.  Use it in the remainder of the function where time(NULL)
appears, which was probably the intention.

Change-Id: I9cc25caf20dcfa466865c7fbf67893b022fdcc3e
Reviewed-on: http://gerrit.openafs.org/8038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/viced/afsfileprocs.c

index 2cfb7c0..48f837a 100644 (file)
@@ -1571,7 +1571,7 @@ Update_ParentVnodeStatus(Vnode * parentptr, Volume * volptr, DirHandle * dir,
      * slot this operation belongs, and bump the appropriate slot.
      */
     now = time(NULL);
-    currDate = (time(NULL) - parentptr->disk.unixModifyTime);
+    currDate = (now - parentptr->disk.unixModifyTime);
     timeIdx =
        (currDate < VOL_STATS_TIME_CAP_0 ? VOL_STATS_TIME_IDX_0 : currDate <
         VOL_STATS_TIME_CAP_1 ? VOL_STATS_TIME_IDX_1 : currDate <
@@ -1586,8 +1586,8 @@ Update_ParentVnodeStatus(Vnode * parentptr, Volume * volptr, DirHandle * dir,
 
     parentptr->disk.author = author;
     parentptr->disk.linkCount = linkcount;
-    parentptr->disk.unixModifyTime = time(NULL);       /* This should be set from CLIENT!! */
-    parentptr->disk.serverModifyTime = time(NULL);
+    parentptr->disk.unixModifyTime = now;      /* This should be set from CLIENT!! */
+    parentptr->disk.serverModifyTime = now;
     parentptr->changed_newTime = 1;    /* vnode changed, write it back. */
 }