Description: Replace strok() to strok_r()
Change-Id: I7364574b218e9a484e4acc93d474f2b6c468f1a7
Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
g_free(pos2);
return NULL;
}
g_free(pos2);
return NULL;
}
- pos2 = strtok (pos2,",\n");
+ pos2 = strtok_r (pos2,",\n", &saveptr);
while (pos2 != NULL) {
char *s = strchr(pos2, ' ');
if (s) {
*s = '\0';
result[i++] = strdup(pos2);
while (pos2 != NULL) {
char *s = strchr(pos2, ' ');
if (s) {
*s = '\0';
result[i++] = strdup(pos2);
- pos2 = strtok (NULL, ",\n");
+ pos2 = strtok_r (NULL, ",\n", &saveptr);