Hello Steve,
if (v == NULL || f == v)
return -1;
I have some questions for "f == v".
I think it only checks the address of "f" and "v". It seems unuseful.
If we need to check whether the value is equal to the field, I think we should use
strcmp().
What your opinion about it?
If you agree with me, I will make another patch for it.