My program is written in C for Linux, and has many functions with different patterns for return values:
1) one or two return n
on success and -1>
One condition I can think of where your above methodology can fail is a function that can return any value including -1, say a function to add two signed numbers.
In that case testing for -1 will surely be a bad idea.
In case something fails, I would better set a global error condition flag provided by the C standard in form of errno
and use that to handle error.
Although, C++ standard library provides exceptions which takes off much hardwork for error handling.