varlink: cleanup use of ERRNO_IS_DISCONNECT()
authorDmitry V. Levin <ldv@strace.io>
Fri, 14 Jul 2023 08:00:00 +0000 (08:00 +0000)
committerDmitry V. Levin <ldv@strace.io>
Fri, 28 Jul 2023 12:28:35 +0000 (12:28 +0000)
commitfa841994dd79f2b142664a42bfa0dc14d0bb38d3
tree76073b6b97b046963be82875f4493e9fd96fb3c7
parent515669c46034f85f0337d100242c8b1336df39e3
varlink: cleanup use of ERRNO_IS_DISCONNECT()

Given that ERRNO_IS_DISCONNECT() also matches positive values,
make sure this macro is not called with arguments that do not have
errno semantics.

In this case the argument passed to ERRNO_IS_DISCONNECT() is the
value returned by varlink_connect_address() which is not expected to
return any positive values, but let's be consistent anyway and move
the ERRNO_IS_DISCONNECT() invocation to the branch where
the return value is known to be negative.
src/core/core-varlink.c