getarg calls srand() ???

storage/ndb/test/src/getarg.c

Guess what? It calls srand(time(NULL)) in getarg(). Why you ask? well.. what you want to be able to when specifying a flag is have it be true, false or it could “maybe” be set.

That’s right kids… maybe.

I’m sure it’s used somewhere in our test suite to get coverage on different things.. but umm.. yeah, interesting discovery for today.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.