be more carful wrt. signed vs. unsigned argument passing
[paraslash.git] / random_selector.c
index d9efaaf..a9863d5 100644 (file)
@@ -133,10 +133,12 @@ static void random_shutdown(void)
 int random_selector_init(struct audio_file_selector *s)
 {
        struct timeval now;
+       unsigned int seed;
 
        PARA_INFO_LOG("%s", "registering random handlers ;)\n");
        gettimeofday(&now, NULL);
-       srand(now.tv_usec);
+       seed = now.tv_usec;
+       srand(seed);
        s->cmd_list = random_selector_cmds;
        s->get_audio_file_list = random_get_audio_file_list;
        s->shutdown = random_shutdown;