volser: combine GCTrans conditional clauses 03/13303/2
authorMark Vitale <mvitale@sinenomine.net>
Thu, 6 Sep 2018 18:09:26 +0000 (14:09 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 21 Sep 2018 12:12:02 +0000 (08:12 -0400)
In preparation for a future commit, combine two conditional clauses in
GCTrans().

No functional change should be incurred by this commit.

Change-Id: Ib08d5b83dd26327124fe0119e6e5f459adc5f78a
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>

src/volser/voltrans.c

index 18811b1..158fec6 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 */