From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 3BF353858416; Thu, 25 May 2023 01:54:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BF353858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684979648; bh=nH7kV9n7MrExttsxmhvSmvxN10AhmHAzNLaVJKsStuA=; h=From:To:Subject:Date:From; b=hSy0LkdiAVjZX40oow7EDrjl5pdJNDjMO7f0eMaWRwBd9W+IK0RSXrKBExifgXXC9 rttOo/EMdOeUsAelszBMkGChqFCY3XBXmrtejnwFUHDJx6IOE2K5RajFDzFWMCpLSX HNeHSKw0lu6Mlb0pPnUKfnBODLJ6YVFPlzO7loKc= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc] sunrpc/netname.c: fix warn unused result X-Act-Checkin: glibc X-Git-Author: =?utf-8?b?RnLDqWTDqXJpYyBCw6lyYXQ=?= X-Git-Refname: refs/heads/master X-Git-Oldrev: d4ad86a0e1ca45517298307bd6ea47a27bd7a346 X-Git-Newrev: a961e16ff67e62b26e23d43f323c718ffcf84e1e Message-Id: <20230525015408.3BF353858416@sourceware.org> Date: Thu, 25 May 2023 01:54:08 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a961e16ff67e62b26e23d43f323c718ffcf84e1e commit a961e16ff67e62b26e23d43f323c718ffcf84e1e Author: Frédéric Bérat 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 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