summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-10-01 15:44:02 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-10-02 23:05:05 +0900
commit451daa394e6d256c33599794559454e765243b4e (patch)
tree4ed0dbdd4d2854d63334ba2bb62a2303724764a6 /src/libsystemd-network
parent6f8c3de6b7ff74f567b015f0e75c32b06d9d5d41 (diff)
downloadsystemd-451daa394e6d256c33599794559454e765243b4e.tar.gz
sd-dhcp6-client: slightly shorten dhcp6_option_append_fqdn()
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/dhcp6-option.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c
index de54c36a71..f257c56681 100644
--- a/src/libsystemd-network/dhcp6-option.c
+++ b/src/libsystemd-network/dhcp6-option.c
@@ -378,7 +378,7 @@ int dhcp6_option_append_fqdn(uint8_t **buf, size_t *buflen, const char *fqdn) {
buffer[0] = DHCP6_FQDN_FLAG_S; /* Request server to perform AAAA RR DNS updates */
/* Store domain name after flags field */
- r = dns_name_to_wire_format(fqdn, buffer + 1, sizeof(buffer) - 1, false);
+ r = dns_name_to_wire_format(fqdn, buffer + 1, sizeof(buffer) - 1, false);
if (r <= 0)
return r;
@@ -391,9 +391,7 @@ int dhcp6_option_append_fqdn(uint8_t **buf, size_t *buflen, const char *fqdn) {
if (dns_name_is_single_label(fqdn))
r--;
- r = dhcp6_option_append(buf, buflen, SD_DHCP6_OPTION_CLIENT_FQDN, 1 + r, buffer);
-
- return r;
+ return dhcp6_option_append(buf, buflen, SD_DHCP6_OPTION_CLIENT_FQDN, 1 + r, buffer);
}
int dhcp6_option_append_user_class(uint8_t **buf, size_t *buflen, char * const *user_class) {