From 451daa394e6d256c33599794559454e765243b4e Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 1 Oct 2022 15:44:02 +0900 Subject: [PATCH] sd-dhcp6-client: slightly shorten dhcp6_option_append_fqdn() --- src/libsystemd-network/dhcp6-option.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c index de54c36a71b..f257c56681a 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) { -- 2.47.3