]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser: combine GCTrans conditional clauses
authorMark Vitale <mvitale@sinenomine.net>
Thu, 6 Sep 2018 18:09:26 +0000 (14:09 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 21 Dec 2018 11:31:15 +0000 (06:31 -0500)
In preparation for a future commit, combine two conditional clauses in
GCTrans().

No functional change should be incurred by this commit.

Reviewed-on: https://gerrit.openafs.org/13303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 95b0641ad8cfd0358576c6e1a93266fc59ecf710)

Change-Id: If808a00cf935235cdeb20bf73f03ad235f8b2c39
Reviewed-on: https://gerrit.openafs.org/13336
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/volser/voltrans.c

index 18811b1b15de0a70181a5c9b9cdf086c4822167a..158fec603c3070e6feda9ba1a2197bdc73afb431 100644 (file)
@@ -187,9 +187,7 @@ GCTrans(void)
                ((tt->refCount > 0) ? "is older" : "has been idle for more"),
                (((now - tt->time) / GCWAKEUP) * GCWAKEUP));
        }
-       if (tt->refCount > 0)
-           continue;
-       if (tt->time + OLDTRANSTIME < now) {
+       if ((tt->refCount <= 0) && (tt->time + OLDTRANSTIME < now)) {
            Log("trans %u on volume %" AFS_VOLID_FMT " has timed out\n", tt->tid, afs_printable_VolumeId_lu(tt->volid));
 
            tt->refCount++;     /* we're using it now */