tree-wide: use cocinnelle to apply _NEG_ macros
This commit is contained in:
@@ -135,12 +135,12 @@ static int is_delegated(int cgfd, const char *path) {
|
||||
assert(cgfd >= 0 || path);
|
||||
|
||||
r = getxattr_malloc(cgfd < 0 ? path : FORMAT_PROC_FD_PATH(cgfd), "trusted.delegate", &b);
|
||||
if (r < 0 && ERRNO_IS_XATTR_ABSENT(r)) {
|
||||
if (ERRNO_IS_NEG_XATTR_ABSENT(r)) {
|
||||
/* If the trusted xattr isn't set (preferred), then check the untrusted one. Under the
|
||||
* assumption that whoever is trusted enough to own the cgroup, is also trusted enough to
|
||||
* decide if it is delegated or not this should be safe. */
|
||||
r = getxattr_malloc(cgfd < 0 ? path : FORMAT_PROC_FD_PATH(cgfd), "user.delegate", &b);
|
||||
if (r < 0 && ERRNO_IS_XATTR_ABSENT(r))
|
||||
if (ERRNO_IS_NEG_XATTR_ABSENT(r))
|
||||
return false;
|
||||
}
|
||||
if (r < 0)
|
||||
|
||||
@@ -1279,8 +1279,8 @@ int varlink_wait(Varlink *v, usec_t timeout) {
|
||||
return events;
|
||||
|
||||
r = fd_wait_for_event(fd, events, t);
|
||||
if (r < 0 && ERRNO_IS_TRANSIENT(r)) /* Treat EINTR as not a timeout, but also nothing happened, and
|
||||
* the caller gets a chance to call back into us */
|
||||
if (ERRNO_IS_NEG_TRANSIENT(r)) /* Treat EINTR as not a timeout, but also nothing happened, and
|
||||
* the caller gets a chance to call back into us */
|
||||
return 1;
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user