Although, Coverity is wrong, close() *can* "accept a negative number", it just always returns EBADF... which would behave correctly.