why add these returns? Returning an error code is a standard technique in C, not C++ (where exceptions are favored).