[PATCH 7/8] sunrpc/netname.c: fix warn unused result
Frédéric Bérat
fberat@redhat.com
Tue Apr 18 12:11:29 GMT 2023
Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in
glibc.
---
sunrpc/netname.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index dd2cb1b441..949954959a 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
--
2.39.2
More information about the Libc-alpha
mailing list