I'd like to bring some points up for discussion:
1 - We have a great number of methods all across Gluster which (for
example) are declared to be 'int' but in reality return (for example) 0
in all cases, both on the positive and the negative path.
2 - In many cases there are calls to methods that return a value, but
this value is completely ignored (e.g. the method 'foo(...)' return an
int, but all calls are in the form of 'foo(...)' instead of ret =
These 2 issues adversely affects the readability/maintainability of the
project and probably also affect error handling (if an error occurs in a
method that always returns 0, how will the calling methods know that an
These issues are not specific to a certain component, but seem to be all
across the project.
I believe this needs addressing, and probably in one of the following ways:
1 - Change methods to 'void', where there is really no need for a return value.
2 - Actually handle the return value and log erros accordingly.
Of course discretion is needed and in some cases we could change to
void, while in other handle the return value.
I'd like to hear opinions on if and how this needs to be handled.