From owner-svn-src-stable@FreeBSD.ORG Sat Oct 30 10:38:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9BA1065670; Sat, 30 Oct 2010 10:38:24 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 784938FC14; Sat, 30 Oct 2010 10:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9UAcO4d091958; Sat, 30 Oct 2010 10:38:24 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9UAcO9G091954; Sat, 30 Oct 2010 10:38:24 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201010301038.o9UAcO9G091954@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 30 Oct 2010 10:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214550 - stable/7/lib/libc/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2010 10:38:24 -0000 Author: ume Date: Sat Oct 30 10:38:23 2010 New Revision: 214550 URL: http://svn.freebsd.org/changeset/base/214550 Log: MFC r213453: When no protocol entry is found, getproto*_r(3) should return zero. Modified: stable/7/lib/libc/net/getproto.c stable/7/lib/libc/net/getprotoent.c stable/7/lib/libc/net/getprotoname.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/net/getproto.c ============================================================================== --- stable/7/lib/libc/net/getproto.c Sat Oct 30 10:37:11 2010 (r214549) +++ stable/7/lib/libc/net/getproto.c Sat Oct 30 10:38:23 2010 (r214550) @@ -123,7 +123,7 @@ getprotobynumber_r(int proto, struct pro if (rv != NS_SUCCESS) { errno = ret_errno; - return ((ret_errno != 0) ? ret_errno : -1); + return (ret_errno); } return (0); } Modified: stable/7/lib/libc/net/getprotoent.c ============================================================================== --- stable/7/lib/libc/net/getprotoent.c Sat Oct 30 10:37:11 2010 (r214549) +++ stable/7/lib/libc/net/getprotoent.c Sat Oct 30 10:38:23 2010 (r214550) @@ -494,7 +494,7 @@ getprotoent_r(struct protoent *pptr, cha if (rv != NS_SUCCESS) { errno = ret_errno; - return ((ret_errno != 0) ? ret_errno : -1); + return (ret_errno); } return (0); } Modified: stable/7/lib/libc/net/getprotoname.c ============================================================================== --- stable/7/lib/libc/net/getprotoname.c Sat Oct 30 10:37:11 2010 (r214549) +++ stable/7/lib/libc/net/getprotoname.c Sat Oct 30 10:38:23 2010 (r214550) @@ -131,7 +131,7 @@ getprotobyname_r(const char *name, struc if (rv != NS_SUCCESS) { errno = ret_errno; - return ((ret_errno != 0) ? ret_errno : -1); + return (ret_errno); } return (0); }