execute: 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)
commit5cf4c468a4c3f84b0fa55a5658a9404f3d0653b1
tree72c836c20a1545d16eacd903e9997913b42599e1
parent08b8e9130e7fe7bf4149a3abc86b6b12e693721f
execute: 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 arguments passed to ERRNO_IS_PRIVILEGE() are the values
returned by set_oom_score_adjust() and set_coredump_filter() which are
not expected to return any positive values, but let's be consistent
anyway and move the ERRNO_IS_PRIVILEGE() invocations to the branches
where the return values are known to be negative.
src/core/execute.c