diff options
author | pjd <pjd@FreeBSD.org> | 2012-01-10 22:39:07 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-01-10 22:39:07 +0000 |
commit | c5fe5a76f24f997008c868c17e6fe6ed1b2aaf7b (patch) | |
tree | 2219c6a6a85261711a382939a35cabc647cb7775 /sbin/hastd/proto_socketpair.c | |
parent | 29f76d890ec6d66428132ae19aece81336519a79 (diff) | |
download | FreeBSD-src-c5fe5a76f24f997008c868c17e6fe6ed1b2aaf7b.zip FreeBSD-src-c5fe5a76f24f997008c868c17e6fe6ed1b2aaf7b.tar.gz |
For functions that return -1 on failure check exactly for -1 and not for
any negative number.
MFC after: 3 days
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 913d59c..d13caa9 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); |