I read the gearman code man page ( http://manpages.ubuntu.com/manpages/precise/man3/gearman_success.3.html ). They have two functions.
bool gearman_success(gearman_return_t rc) bool gearman_failed(gearman_return_t rc)
And the code of these functions looks like (libgearman-1.0 / return.h):
static inline bool gearman_failed(enum gearman_return_t rc) { return rc != GEARMAN_SUCCESS; } static inline bool gearman_success(enum gearman_return_t rc) { return rc == GEARMAN_SUCCESS; }
Both functions perform almost the same thing. One returns true and the other false. What is the advantage of this code?
Why not just! Gearman_success
Is there any point to coding or something that I don't see here.
source share