I have run into issues with the random number generator that did require calling srand again, but that is rare. Since it is a pseudo-random number generator, patterns can emerge that may be undesirable. If that happens, calling srand will resolve the issue. Chances are you'll never run into such an issue. That being said, alvaro is correct; srand should not be called every time rand is called.

[edit]
I should note that the RNG I was using at the time was limited to 16-bit signed integers.

I have run into issues with the random number generator that did require calling srand again, but that is rare. Since it is a pseudo-random number generator, patterns can emerge that may be undesirable. If that happens, calling srand will resolve the issue. Chances are you'll never run into such an issue. That being said, alvaro is correct; srand should not be called every time rand is called.

[edit]I should note that the RNG I was using at the time was limited to 16-bit signed integers.

Unless you intentionally wish to repeat a previous random sequence, calling srand again is undesireable.Re-seeding causes the period of the PRNG to decrease because you jump to a new point within the sequence. That in itself reduces the amount of randomness.If re-seeding made it seem less random then that was just dumb luck. It can just as easily make things worse.The problem you had, with seeing a pattern in the output, is correctly solved by using a better PRNG.

To the OP: It's a common misconception, but the method you are using isn't actually any less biased that just using the modulus operator, it just puts the bias in different places instead of on values at one end of the range. Specific values still always have a slightly higher probability.Yes you are using the higher bits of the random value, which is good because these are generally more random, but that is still tangential to the issue of the distribution bias introduced by the funnelling of N inputs down to K outputs where gcd(K, N) != 1.

Of course for what you want to use it for, the amount of bias you get is probably not important.

Unless you intentionally wish to repeat a previous random sequence, calling srand again is undesireable.Re-seeding causes the period of the PRNG to decrease because you jump to a new point within the sequence. That in itself reduces the amount of randomness.If re-seeding made it seem less random then that was just dumb luck. It can just as easily make things worse.The problem you had, with seeing a pattern in the output, is correctly solved by using a better PRNG.

I stand corrected. The PRNG was the Macintosh library function, Random. It gave a 16-bit signed output and it was pretty terrible. After a few thousand iterations, the "randomness" would converge to a small sequence of repeating numbers. The only way to resolve this was to reseed the RNG. I've been doing it this way ever since, save for when I switched to using Mersanine twister.