}
case 't': {
int log_mode = LOG_MODE_NONE;
- char *token = strtok(optarg, ",");
+ char *usr_ptr = NULL;
+ char *token = strtok_r(optarg, ",", &usr_ptr);
while (token != NULL) {
if (strncmp(token, "stderr", MAX_MSG_LEN) == 0) {
"Use one (or combination separated by coma) "
"from the list: dlog, stderr, and dlog.\n", token);
}
- token = strtok(NULL, ", ");
+ token = strtok_r(NULL, ", ", &usr_ptr);
}
if (log_mode != LOG_MODE_NONE)