summaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-08-25 18:55:07 +0000
committerJakub Jelinek <jakub@redhat.com>2007-08-25 18:55:07 +0000
commitdd3394742b3e2e01f403b1c1b41ed39273b2212e (patch)
tree5fed86738b0d518989679f3194f896fc9fcebbe2 /string
parent9b0cdd693e7f54fd35fd58931b940efe6ccb88cd (diff)
Updated to fedora-glibc-20070825T1839
Diffstat (limited to 'string')
-rw-r--r--string/strfry.c2
-rw-r--r--string/strtok.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/string/strfry.c b/string/strfry.c
index a8b202d176..d392d5526b 100644
--- a/string/strfry.c
+++ b/string/strfry.c
@@ -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];
diff --git a/string/strtok.c b/string/strtok.c
index f45b760f74..9d6bb06779 100644
--- a/string/strtok.c
+++ b/string/strtok.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,1999,2000,2001,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +31,7 @@ static char *olds;
x = strtok(s, "-"); // x = "abc"
x = strtok(NULL, "-="); // x = "def"
x = strtok(NULL, "="); // x = NULL
- // s = "abc\0-def\0"
+ // s = "abc\0=-def\0"
*/
char *
strtok (s, delim)