From f5a0b8a5e24cede05e15ab696f0e15257a503525 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Thu, 31 Jan 2019 18:20:48 +0100 Subject: [HICN24] Windows compatibility for hicn-light Change-Id: I8e19e52c9b4ec0fcbd7344c28765f5da1937569c Signed-off-by: Angelo Mantellini --- hicn-light/src/config/commandParser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hicn-light/src/config/commandParser.c') diff --git a/hicn-light/src/config/commandParser.c b/hicn-light/src/config/commandParser.c index 84d273c9d..9a947d8b7 100644 --- a/hicn-light/src/config/commandParser.c +++ b/hicn-light/src/config/commandParser.c @@ -15,13 +15,11 @@ #include +#include #include #include #include #include -#include - -#include #include #include @@ -124,11 +122,13 @@ static PARCList *parseStringIntoTokens(const char *originalString) { char *tofree = parcMemory_StringDuplicate(originalString, strlen(originalString) + 1); char *string = tofree; - - while ((token = strsep(&string, " \t\n")) != NULL) { + + token = strtok(string, " \t\n"); + while (token != NULL) { if (strlen(token) > 0) { parcList_Add(list, strdup(token)); } + token = strtok(NULL, " \t\n"); } parcMemory_Deallocate((void **)&tofree); -- cgit 1.2.3-korg