Utils: fix return value check on libc_error() stuff

Signed-off-by: Eduardo Silva <eduardo@monkey.io>