MCPcopy Index your code
hub / github.com/RsyncProject/rsync / poptRandomValue

Function poptRandomValue

popt/popt.c:917–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915}
916
917static long long poptRandomValue(long long limit)
918{
919#if defined(HAVE_SRANDOM)
920 static int seed = 1;
921
922 if (seed) {
923 srandom((unsigned)getpid());
924 srandom((unsigned)random());
925 seed = 0;
926 }
927
928 return random() % limit + 1;
929#else
930 /* XXX avoid adding POPT_ERROR_UNIMPLEMENTED to minimize i18n churn. */
931 return POPT_ERROR_BADOPERATION;
932#endif
933}
934
935int poptSaveLongLong(long long * arg, unsigned int argInfo, long long aLongLong)
936{

Callers 4

poptSaveLongLongFunction · 0.85
poptSaveLongFunction · 0.85
poptSaveIntFunction · 0.85
poptSaveShortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected