X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f9436b840852218b39dce22d6057b6f223168daa..863aeead864a309c494893a1b06ec33ed2b7daf1:/src/xbt/xbt_str.cpp diff --git a/src/xbt/xbt_str.cpp b/src/xbt/xbt_str.cpp index 1146eef75f..6637f211da 100644 --- a/src/xbt/xbt_str.cpp +++ b/src/xbt/xbt_str.cpp @@ -219,12 +219,11 @@ xbt_dynar_t xbt_str_split_str(const char *s, const char *sep) while (not done) { char *to_push; - int v = 0; // get the start of the first occurrence of the substring q = strstr(p, sep); //if substring was not found add the entire string if (nullptr == q) { - v = strlen(p); + int v = strlen(p); to_push = (char*) xbt_malloc(v + 1); memcpy(to_push, p, v); to_push[v] = '\0';