summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-14 17:03:30 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-14 17:03:30 +0200
commit98e80bf9d2f069e58283a74a6cfd8bf69578af31 (patch)
treec5b3c50d35b1ad220a8c828eeefedcb6612ae97a /src/resolve/resolved-dns-rr.c
parent35aa30697a3f747d183fe134d55d1b177736ebd8 (diff)
downloadsystemd-98e80bf9d2f069e58283a74a6cfd8bf69578af31.tar.gz
resolved: use narrower types for label counts in rr
Order will be adjusted later to remove holes.
Diffstat (limited to 'src/resolve/resolved-dns-rr.c')
-rw-r--r--src/resolve/resolved-dns-rr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 0493faee6b..e493c32158 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -381,8 +381,8 @@ DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key) {
.n_ref = 1,
.key = dns_resource_key_ref(key),
.expiry = USEC_INFINITY,
- .n_skip_labels_signer = UINT_MAX,
- .n_skip_labels_source = UINT_MAX,
+ .n_skip_labels_signer = UINT8_MAX,
+ .n_skip_labels_source = UINT8_MAX,
};
return rr;
@@ -1258,7 +1258,7 @@ int dns_resource_record_signer(DnsResourceRecord *rr, const char **ret) {
/* Returns the RRset's signer, if it is known. */
- if (rr->n_skip_labels_signer == UINT_MAX)
+ if (rr->n_skip_labels_signer == UINT8_MAX)
return -ENODATA;
n = dns_resource_key_name(rr->key);
@@ -1281,7 +1281,7 @@ int dns_resource_record_source(DnsResourceRecord *rr, const char **ret) {
/* Returns the RRset's synthesizing source, if it is known. */
- if (rr->n_skip_labels_source == UINT_MAX)
+ if (rr->n_skip_labels_source == UINT8_MAX)
return -ENODATA;
n = dns_resource_key_name(rr->key);
@@ -1315,7 +1315,7 @@ int dns_resource_record_is_synthetic(DnsResourceRecord *rr) {
/* Returns > 0 if the RR is generated from a wildcard, and is not the asterisk name itself */
- if (rr->n_skip_labels_source == UINT_MAX)
+ if (rr->n_skip_labels_source == UINT8_MAX)
return -ENODATA;
if (rr->n_skip_labels_source == 0)