diff options
author | Luca Muscariello <lumuscar+fdio@cisco.com> | 2019-02-01 20:00:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-02-01 20:00:21 +0000 |
commit | 79f9c336d9d8af63e322e3c52f09fec3d7cb3c2b (patch) | |
tree | 7674e218ee813ff7aec6868ab86a1dd6c40af28f /hicn-light/src/config/commandParser.c | |
parent | e8fabe3f6313a3b9050fe16458e4714d9dce426e (diff) | |
parent | f5a0b8a5e24cede05e15ab696f0e15257a503525 (diff) |
Merge "[HICN24] Windows compatibility for hicn-light"
Diffstat (limited to 'hicn-light/src/config/commandParser.c')
-rw-r--r-- | hicn-light/src/config/commandParser.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 <src/config.h> +#include <parc/assert/parc_Assert.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <strings.h> - -#include <parc/assert/parc_Assert.h> #include <string.h> #include <parc/security/parc_Security.h> @@ -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); |