gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: use strtok_r in code that could plausibl


From: gnunet
Subject: [gnunet] branch master updated: use strtok_r in code that could plausibly be used from multi-threaded applications
Date: Thu, 19 Mar 2020 19:44:52 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new efa84b551 use strtok_r in code that could plausibly be used from 
multi-threaded applications
efa84b551 is described below

commit efa84b551b102245efb67dd44a944d983ffb0411
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Mar 19 19:40:34 2020 +0100

    use strtok_r in code that could plausibly be used from multi-threaded 
applications
---
 src/util/strings.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/util/strings.c b/src/util/strings.c
index 981718e4c..ac9805cdd 100644
--- 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
     {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]