strncpy() causes reset

I want to use strtok (using \n as delimiter) to parse each line, but first I'm using strncpy() to prevent a
a invalid conversion from 'const char*' to 'char*'

The proper cast would prevent the "problem" without the need to copy the string.