coredumpctl: cleanup use of ERRNO_IS_PRIVILEGE()
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)
commitf5d6b78666ad6013a4903956fb81a435659e7914
treefc777e1eaadaf40ea6ff2570433a08dd7ee165cf
parent5cf4c468a4c3f84b0fa55a5658a9404f3d0653b1
coredumpctl: cleanup use of ERRNO_IS_PRIVILEGE()

Given that ERRNO_IS_PRIVILEGE() 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_PRIVILEGE() is the value
returned by access_fd() which is not expected to return any positive
values, but let's be consistent anyway and move the ERRNO_IS_PRIVILEGE()
invocation to the branch where the return value is known to be negative.
src/coredump/coredumpctl.c