- if ('e' == line[0]) { /* e:<type>:<bytes> */
- char *ptr = NULL;
- char *type = strtok_r(line + 2, ":", &ptr);
- char *tmp = strtok_r(NULL, ":", &ptr);
- int bytes = 0;
-
- if (NULL == tmp) {
+ if (line[0] == 'e') { /* e:<type>:<bytes> */
+ char *type = line + 2;
+ char *bytes_str = strchr(type, ':');
+ if (bytes_str == NULL) {