]> git.sesse.net Git - vlc/commitdiff
use unsigned rand-function in playlist thread
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 28 Jul 2010 10:28:33 +0000 (13:28 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Wed, 28 Jul 2010 10:52:30 +0000 (13:52 +0300)
src/playlist/thread.c

index 194099631c3b44d3f632d0f7e5144b7559114b33..a87881c499301fde2ade3ff9406f8729ef52a51e 100644 (file)
@@ -195,7 +195,7 @@ static void ResetCurrentlyPlaying( playlist_t *p_playlist,
         /* Shuffle the array */
         for( unsigned j = p_playlist->current.i_size - 1; j > 0; j-- )
         {
-            unsigned i = ((unsigned)vlc_mrand48()) % (j+1); /* between 0 and j */
+            unsigned i = vlc_lrand48() % (j+1); /* between 0 and j */
             playlist_item_t *p_tmp;
             /* swap the two items */
             p_tmp = ARRAY_VAL(p_playlist->current, i);