summaryrefslogtreecommitdiff
path: root/src/nss-myhostname
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-15 00:50:25 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-05 23:19:56 -0400
commit82e4c2d656941a76d7c5f86d70cd8b435cb52860 (patch)
treee3a8300be31d45d159a8607f1cb8a82d786a5f4b /src/nss-myhostname
parent2abb5b3b10e3a9ed8ffd0189e8a1828ec086f69e (diff)
downloadsystemd-82e4c2d656941a76d7c5f86d70cd8b435cb52860.tar.gz
nss-myhostname: remove dead test of variable that was not set
Diffstat (limited to 'src/nss-myhostname')
-rw-r--r--src/nss-myhostname/nss-myhostname.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
index 460a613b9d..2b83d127b7 100644
--- a/src/nss-myhostname/nss-myhostname.c
+++ b/src/nss-myhostname/nss-myhostname.c
@@ -480,7 +480,7 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
return NSS_STATUS_NOTFOUND;
found:
- if (!canonical || (!additional && additional_from_hostname)) {
+ if (!canonical || additional_from_hostname) {
hn = gethostname_malloc();
if (!hn) {
*errnop = ENOMEM;
@@ -490,8 +490,7 @@ found:
if (!canonical)
canonical = hn;
-
- if (!additional && additional_from_hostname)
+ else
additional = hn;
}