diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-06-10 02:49:07 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-06-10 02:49:07 +0200 |
commit | 47484dd95538a0f9f43add4f7655dcfa2b5d97d9 (patch) | |
tree | 4677fb76ea8874e18256ac1db3bf8dbfc09c6a76 /src/shared/dns-domain.c | |
parent | dns-domain: use dns_name_concat() (diff) | |
download | systemd-47484dd95538a0f9f43add4f7655dcfa2b5d97d9.tar.xz systemd-47484dd95538a0f9f43add4f7655dcfa2b5d97d9.zip |
dns-domain: simplify code a bit
Diffstat (limited to 'src/shared/dns-domain.c')
-rw-r--r-- | src/shared/dns-domain.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c index 0ae1de1c5b..9acf1cb0d6 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c @@ -450,12 +450,8 @@ int dns_name_concat(const char *a, const char *b, DNSLabelFlags flags, char **_r return r; } - if (!first) - n++; - else - first = false; - - n += r; + n += r + !first; + first = false; } finish: |