public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] sunrpc/netname.c: fix warn unused result
@ 2023-05-25 1:54 Siddhesh Poyarekar
0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-05-25 1:54 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a961e16ff67e62b26e23d43f323c718ffcf84e1e
commit a961e16ff67e62b26e23d43f323c718ffcf84e1e
Author: Frédéric Bérat <fberat@redhat.com>
Date: Fri Apr 28 14:21:32 2023 +0200
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>
Diff:
---
sunrpc/netname.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index dd2cb1b441..d9d82501b0 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-25 1:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 1:54 [glibc] sunrpc/netname.c: fix warn unused result Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).