Fixed a couple Clang warnings

Fixed some recently introduced "regressions" that trigger Clang warnings while building on OS X (`checkout.c` one is a real bug too).
I checked the what the macro does below and it seems to just return -1 which is the generic error. Did I miss something?