Hi John,This is really a redundant step, I will remove it.n;why duplicate this? are you modifying something?
+
+ str = strdup(compat);
I reviewed this code again and found that it still needs to duplicate "compat" because "compat" is a
const str* type and cannot be used as a parameter for the strtok_r function. If it is cast to char*,
using "compat" as a parameter for strtok_r is also unsafe and can cause a "Segmentation fault" error.
Therefore, let's keep the step of duplicating "compat".