newbuild: fix wrong return values as reported by clang