【trick】use negative line number as return value on error
For frequently modified functions without specified enum value returned on error, you may just return -1 or other magic number.
I prefer to make use of the line number as return value, which naturally indicates which line goes wrong across the lifetime of the everchanging code.
#define ERR_LINE (-__LINE__) int foo() { if (...) { return ERR_LINE; } }