summaryrefslogtreecommitdiffstats
path: root/hicn-light/src/config/commandParser.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/config/commandParser.c')
-rw-r--r--hicn-light/src/config/commandParser.c10
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);