MCPcopy Create free account
hub / github.com/csmith-project/csmith / rnd_upto

Method rnd_upto

src/DFSRndNumGenerator.cpp:453–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453unsigned int
454DFSRndNumGenerator::rnd_upto(const unsigned int n, const Filter *f, const std::string *where)
455{
456 int x = random_choice(n, f, where);
457 assert(x == -1 || (x >= 0 && x < static_cast<int>(n)));
458 return x;
459}
460
461bool
462DFSRndNumGenerator::rnd_flipcoin(const unsigned int n, const Filter *f, const std::string *where)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected