projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d125343
)
use strtok_r in code that could plausibly be used from multi-threaded applications
author
Christian Grothoff
<christian@grothoff.org>
Thu, 19 Mar 2020 18:40:34 +0000
(19:40 +0100)
committer
Christian Grothoff
<christian@grothoff.org>
Thu, 19 Mar 2020 18:40:34 +0000
(19:40 +0100)
src/util/strings.c
patch
|
blob
|
history
diff --git
a/src/util/strings.c
b/src/util/strings.c
index 981718e4c088e1003971cf69b4f2c486b7474dd3..ac9805cdd79b749d413d3b9904a104af3073ac63 100644
(file)
--- a/
src/util/strings.c
+++ b/
src/util/strings.c
@@
-266,11
+266,14
@@
convert_with_table (const char *input,
const char *tok;
unsigned long long last;
unsigned int i;
+ char *sptr;
ret = 0;
last = 0;
in = GNUNET_strdup (input);
- for (tok = strtok (in, " "); tok != NULL; tok = strtok (NULL, " "))
+ for (tok = strtok_r (in, " ", &sptr);
+ tok != NULL;
+ tok = strtok_r (NULL, " ", &sptr))
{
do
{