summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-23 11:04:10 +0100
committerVolker Lendecke <vl@samba.org>2008-01-23 15:08:04 +0100
commit587cf54c61c9f1f7bcae431a82035fd942716c32 (patch)
treec11ebe9ab6ed860e7e768b1b7de4db3c8ac609a1 /source3/torture
parent20512431321388cf293431b942cbbe9263d295c9 (diff)
downloadsamba-587cf54c61c9f1f7bcae431a82035fd942716c32.tar.gz
samba-587cf54c61c9f1f7bcae431a82035fd942716c32.tar.bz2
samba-587cf54c61c9f1f7bcae431a82035fd942716c32.zip
strtok -> strtok_r
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 070474cf6f..8d67e512fe 100644
--- a/source3/torture/torture.c
+++ b/source3/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] = "";