tree-wide: no need to negate argument to ERROR_IS_XYZ()
These macros call abs() internally, hence let's simplify invocations.
This commit is contained in:
parent
fd8a301703
commit
95d2155aeb
|
@ -1184,7 +1184,7 @@ static int on_dns_packet(sd_event_source *s, int fd, uint32_t revents, void *use
|
|||
assert(t->scope);
|
||||
|
||||
r = manager_recv(t->scope->manager, fd, DNS_PROTOCOL_DNS, &p);
|
||||
if (ERRNO_IS_DISCONNECT(-r)) {
|
||||
if (ERRNO_IS_DISCONNECT(r)) {
|
||||
usec_t usec;
|
||||
|
||||
/* UDP connection failures get reported via ICMP and then are possibly delivered to us on the
|
||||
|
@ -1737,7 +1737,7 @@ int dns_transaction_go(DnsTransaction *t) {
|
|||
dns_transaction_complete(t, DNS_TRANSACTION_RR_TYPE_UNSUPPORTED);
|
||||
return 0;
|
||||
}
|
||||
if (t->scope->protocol == DNS_PROTOCOL_LLMNR && ERRNO_IS_DISCONNECT(-r)) {
|
||||
if (t->scope->protocol == DNS_PROTOCOL_LLMNR && ERRNO_IS_DISCONNECT(r)) {
|
||||
/* On LLMNR, if we cannot connect to a host via TCP when doing reverse lookups. This means we cannot
|
||||
* answer this request with this protocol. */
|
||||
dns_transaction_complete(t, DNS_TRANSACTION_NOT_FOUND);
|
||||
|
|
|
@ -3402,7 +3402,7 @@ static int run(int argc, char *argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
if (ERRNO_IS_RESOURCE(-r))
|
||||
if (ERRNO_IS_RESOURCE(r))
|
||||
return r;
|
||||
if (invalid_config)
|
||||
return EX_DATAERR;
|
||||
|
|
Loading…
Reference in a new issue