public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] sunrpc/netname.c: fix warn unused result
Date: Thu, 25 May 2023 01:54:08 +0000 (GMT)	[thread overview]
Message-ID: <20230525015408.3BF353858416@sourceware.org> (raw)

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

                 reply	other threads:[~2023-05-25  1:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230525015408.3BF353858416@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).