From owner-svn-src-stable@FreeBSD.ORG Sat Oct 30 10:30:50 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 844FA106564A; Sat, 30 Oct 2010 10:30:50 +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 0595F8FC1A; Sat, 30 Oct 2010 10:30:50 +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 o9UAUnMc091570; Sat, 30 Oct 2010 10:30:49 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9UAUnQO091566; Sat, 30 Oct 2010 10:30:49 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201010301030.o9UAUnQO091566@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 30 Oct 2010 10:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214548 - stable/8/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:30:50 -0000 Author: ume Date: Sat Oct 30 10:30:49 2010 New Revision: 214548 URL: http://svn.freebsd.org/changeset/base/214548 Log: MFC r213453: When no protocol entry is found, getproto*_r(3) should return zero. Modified: stable/8/lib/libc/net/getproto.c stable/8/lib/libc/net/getprotoent.c stable/8/lib/libc/net/getprotoname.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/net/getproto.c ============================================================================== --- stable/8/lib/libc/net/getproto.c Sat Oct 30 10:28:33 2010 (r214547) +++ stable/8/lib/libc/net/getproto.c Sat Oct 30 10:30:49 2010 (r214548) @@ -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/8/lib/libc/net/getprotoent.c ============================================================================== --- stable/8/lib/libc/net/getprotoent.c Sat Oct 30 10:28:33 2010 (r214547) +++ stable/8/lib/libc/net/getprotoent.c Sat Oct 30 10:30:49 2010 (r214548) @@ -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/8/lib/libc/net/getprotoname.c ============================================================================== --- stable/8/lib/libc/net/getprotoname.c Sat Oct 30 10:28:33 2010 (r214547) +++ stable/8/lib/libc/net/getprotoname.c Sat Oct 30 10:30:49 2010 (r214548) @@ -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); }