Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 2010 10:38:24 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r214550 - stable/7/lib/libc/net
Message-ID:  <201010301038.o9UAcO9G091954@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010301038.o9UAcO9G091954>