diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-23 11:04:10 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-23 15:08:04 +0100 |
commit | fd34ce437057bb34cdc37f4b066e424000d36789 (patch) | |
tree | e3fe6a29bfed90c756804be22a88243d9ca9a3aa /source/torture/torture.c | |
parent | da131d089db98017632103aa9bbe38c98f7a3fc1 (diff) | |
download | samba-fd34ce437057bb34cdc37f4b066e424000d36789.tar.gz samba-fd34ce437057bb34cdc37f4b066e424000d36789.tar.xz samba-fd34ce437057bb34cdc37f4b066e424000d36789.zip |
strtok -> strtok_r
Diffstat (limited to 'source/torture/torture.c')
-rw-r--r-- | source/torture/torture.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/torture/torture.c b/source/torture/torture.c index 070474cf6fb..8d67e512fe6 100644 --- a/source/torture/torture.c +++ b/source/torture/torture.c @@ -890,6 +890,7 @@ static bool run_netbench(int client) } while (fgets(line, sizeof(line)-1, f)) { + char *saveptr; line_count++; line[strlen(line)-1] = 0; @@ -899,9 +900,9 @@ static bool run_netbench(int client) all_string_sub(line,"client1", cname, sizeof(line)); /* parse the command parameters */ - params[0] = strtok(line," "); + params[0] = strtok_r(line, " ", &saveptr); i = 0; - while (params[i]) params[++i] = strtok(NULL," "); + while (params[i]) params[++i] = strtok_r(NULL, " ", &saveptr); params[i] = ""; |