diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-02-06 11:30:19 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-02-23 23:38:30 -0500 |
commit | 657dbed29af59d519587aedf9f4a6ab921b0668c (patch) | |
tree | 5a916d7295514f7a53fc18db858d74cb508ba234 /src/resolve/resolved-bus.c | |
parent | 1c73f3bc29111a00738569c9d40a989b161a0624 (diff) |
resolved: use == for comparing unsigned against zero
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 03c84786db..fba2afcc8d 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -183,7 +183,7 @@ static void bus_method_resolve_hostname_complete(DnsQuery *q) { } } - if (added <= 0) { + if (added == 0) { if (!cname) { r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "'%s' does not have any RR of requested type", q->request_hostname); goto finish; @@ -220,6 +220,8 @@ static void bus_method_resolve_hostname_complete(DnsQuery *q) { added++; } + // what about the cache? + /* If we didn't find anything, then let's restart the * query, this time with the cname */ if (added <= 0) { @@ -398,7 +400,7 @@ static void bus_method_resolve_address_complete(DnsQuery *q) { } } - if (added <= 0) { + if (added == 0) { _cleanup_free_ char *ip = NULL; in_addr_to_string(q->request_family, &q->request_address, &ip); |