svn commit: r214548 - stable/8/lib/libc/net

Hajimu UMEMOTO ume at FreeBSD.org
Sat Oct 30 10:30:50 UTC 2010


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);
 }


More information about the svn-src-stable-8 mailing list