Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

static unsigned RandIdx ( unsigned  cEntries  )  [static]

Get a random index.

Returns:
random index.
Parameters:
cEntries The number of entries in the table.

Definition at line 71 of file tstkLdrHeap.c.

Referenced by main().

{
    unsigned i = (unsigned)rand();
    while (i >= cEntries)
        i >>= 1;
    return i;
}


Generated by  Doxygen 1.6.0   Back to index