Easy question: Passing variables to function

Why bother with another buffer?

The second token would be "DEVOK, 16:28:13 #STSET, 16:28:13 #DASET, 16:28:13". If you want to extract just the 1st time from that, you need to make a copy of it. Calling strtok() with a pointer to internal data stored by the strtok() function is not a good idea. The internal data will be destroyed as soon as strtok() detects that the input argument is not NULL, rendering the pointer useless.