(strfry): It's not even worth documenting...
authordrepper <drepper>
Wed, 22 Aug 2007 07:27:39 +0000 (07:27 +0000)
committerdrepper <drepper>
Wed, 22 Aug 2007 07:27:39 +0000 (07:27 +0000)
string/strfry.c

index a8b202d..d392d55 100644 (file)
@@ -42,7 +42,7 @@ strfry (char *string)
     {
       int32_t j;
       __random_r (&rdata, &j);
-      j = j % len + 1;
+      j = j % (len - i) + i;
 
       char c = string[i];
       string[i] = string[j];