]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/file: Use MIN macro
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:47 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:47 +0000 (11:23 -0700)
open-vm-tools/lib/file/fileLockPrimitive.c

index 0ebe7828618e85b8ffbf65903d944cd84ade3802..7a5e52f8ae72c85972263a5a32259525711a8dd2 100644 (file)
@@ -144,11 +144,7 @@ FileLockSleeper(LockValues *myValues)  // IN/OUT:
        * The lock has been around a while, linear back off with an upper bound.
        */
 
-      maxSleepTimeMsec = ageMsec/10;
-
-      if (maxSleepTimeMsec > 2000) {
-         maxSleepTimeMsec = 2000;
-      }
+      maxSleepTimeMsec = MIN(ageMsec / 10, 2000);
    }
 
    (void) FileSleeper(maxSleepTimeMsec / 10, maxSleepTimeMsec);