aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-04-28 14:21:32 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-05-24 21:52:31 -0400
commita961e16ff67e62b26e23d43f323c718ffcf84e1e (patch)
tree1fffed3ecbeda79da5dbd55a17e41ea03b152ffe
parentd4ad86a0e1ca45517298307bd6ea47a27bd7a346 (diff)
downloadglibc-a961e16ff67e62b26e23d43f323c718ffcf84e1e.zip
glibc-a961e16ff67e62b26e23d43f323c718ffcf84e1e.tar.gz
glibc-a961e16ff67e62b26e23d43f323c718ffcf84e1e.tar.bz2
sunrpc/netname.c: fix warn unused result
Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in glibc. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
-rw-r--r--sunrpc/netname.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index dd2cb1b..d9d8250 100644
--- a/sunrpc/netname.c
+++ b/sunrpc/netname.c
@@ -96,7 +96,8 @@ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
else
{
domainname[0] = 0;
- getdomainname (domainname, MAXHOSTNAMELEN);
+ if (getdomainname (domainname, MAXHOSTNAMELEN))
+ return 0;
}
}
else