]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: 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)
commit1553f9b1bc127eb21fc08a791d0a4a79e4a839ff
tree420b203fffc2a81bca966b2f569eee338daaddda
parent7a0b6d312b42b488b79117066fc3859bea4e8164
test: 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 procfs_get_pid_max() and procfs_get_threads_max() which are
not expected to return any positive values, but let's be consistent
anyway and move ERRNO_IS_PRIVILEGE() invocations to the branches where
the return values are known to be negative.
src/test/test-procfs-util.c