From: Marc Dionne Date: Tue, 4 Sep 2012 21:09:00 +0000 (-0400) Subject: viced: Make use of unused variable X-Git-Tag: upstream/1.8.0_pre1^2~2051 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=50a6b047093092a72e925d143fe0d4c7587c2386;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 2cfb7c0df..48f837a53 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. */ }