From 50a6b047093092a72e925d143fe0d4c7587c2386 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Tue, 4 Sep 2012 17:09:00 -0400 Subject: [PATCH] viced: Make use of unused variable 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 Reviewed-by: Jeffrey Altman --- src/viced/afsfileprocs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 2cfb7c0..48f837a 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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. */ } -- 1.9.4