From: VMware, Inc <> Date: Mon, 26 Apr 2010 18:22:47 +0000 (-0700) Subject: lib/misc: cleanup X-Git-Tag: 2010.04.25-253928~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79a46799e052d4ae31b3bf6d96353df9604e9ed4;p=thirdparty%2Fopen-vm-tools.git lib/misc: cleanup code standard cleanup Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/misc/random.c b/open-vm-tools/lib/misc/random.c index abe027785..a4b4925d5 100644 --- a/open-vm-tools/lib/misc/random.c +++ b/open-vm-tools/lib/misc/random.c @@ -285,7 +285,7 @@ Random_Quick(void *context) // IN/OUT: } -/** +/* *---------------------------------------------------------------------- * * FastRand -- @@ -309,11 +309,12 @@ Random_Quick(void *context) // IN/OUT: */ int -FastRand(int seed) +FastRand(int seed) // IN: { uint64 product = 33614 * (uint64)seed; uint32 product_lo = (uint32)(product & 0xffffffff) >> 1; uint32 product_hi = product >> 32; int32 test = product_lo + product_hi; + return test > 0 ? test : (test & 0x7fffffff) + 1; }