diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2012-01-10 22:39:07 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2012-01-10 22:39:07 +0000 |
commit | 2b1b224d2486d7df9f51f12377e5f1e0ac9e3d78 (patch) | |
tree | 2219c6a6a85261711a382939a35cabc647cb7775 /sbin/hastd/proto_socketpair.c | |
parent | 45bd093cb0b87c730cae5adf4e2878a4f3b678cf (diff) | |
download | src-2b1b224d2486d7df9f51f12377e5f1e0ac9e3d78.tar.gz src-2b1b224d2486d7df9f51f12377e5f1e0ac9e3d78.zip |
For functions that return -1 on failure check exactly for -1 and not for
any negative number.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=229945
Diffstat (limited to 'sbin/hastd/proto_socketpair.c')
-rw-r--r-- | sbin/hastd/proto_socketpair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/proto_socketpair.c b/sbin/hastd/proto_socketpair.c index 913d59ca8f18..d13caa988ea6 100644 --- a/sbin/hastd/proto_socketpair.c +++ b/sbin/hastd/proto_socketpair.c @@ -70,7 +70,7 @@ sp_client(const char *srcaddr, const char *dstaddr, void **ctxp) if (spctx == NULL) return (errno); - if (socketpair(PF_UNIX, SOCK_STREAM, 0, spctx->sp_fd) < 0) { + if (socketpair(PF_UNIX, SOCK_STREAM, 0, spctx->sp_fd) == -1) { ret = errno; free(spctx); return (ret); |