summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-02 08:24:56 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-02 08:24:56 +0000
commit4b1fef8482da6863711fdb64f06413f06424dad7 (patch)
tree883ede0090b13e8c31b9178773134a73284eebaf
parentb71e7ce8641f7331de82cabea384359cf6d8546d (diff)
downloadglibc-4b1fef8482da6863711fdb64f06413f06424dad7.tar.gz
glibc-4b1fef8482da6863711fdb64f06413f06424dad7.tar.xz
glibc-4b1fef8482da6863711fdb64f06413f06424dad7.zip
Update.
2001-02-02  Ulrich Drepper  <drepper@redhat.com>

	* string/tst-svc.input: Add two more test cases.
	* string/tst-svc.expect: Modify to reflect new test cases.

2001-02-01  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/posix/getaddrinfo.c (gaih_local, gaih_inet): Replace all
	tp->name tests with tp->name[0] tests.

2001-01-29  Ben Collins  <bcollins@debian.org>

	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
	Fix check for name == NULL.
-rw-r--r--ChangeLog15
-rw-r--r--nis/nss_nisplus/nisplus-ethers.c4
-rw-r--r--string/tst-svc.expect2
-rw-r--r--string/tst-svc.input2
-rw-r--r--sysdeps/posix/getaddrinfo.c14
5 files changed, 28 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 907a14c7f2..3058a735ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2001-02-02  Ulrich Drepper  <drepper@redhat.com>
+
+	* string/tst-svc.input: Add two more test cases.
+	* string/tst-svc.expect: Modify to reflect new test cases.
+
+2001-02-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_local, gaih_inet): Replace all
+	tp->name tests with tp->name[0] tests.
+
+2001-01-29  Ben Collins  <bcollins@debian.org>
+
+	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
+	Fix check for name == NULL.
+
 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
 
 	* elf/Makefile: Add rules to build and run initfirst test.
diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c
index 061dfbffa0..cbba2d39b5 100644
--- a/nis/nss_nisplus/nisplus-ethers.c
+++ b/nis/nss_nisplus/nisplus-ethers.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -222,7 +222,7 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
 	return status;
     }
 
-  if (name != NULL)
+  if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
diff --git a/string/tst-svc.expect b/string/tst-svc.expect
index f4eb4911b1..bb54a2ace0 100644
--- a/string/tst-svc.expect
+++ b/string/tst-svc.expect
@@ -6,6 +6,8 @@
 01a
 0
 0a
+2.8
+2.8-0.4
 20
 21
 22
diff --git a/string/tst-svc.input b/string/tst-svc.input
index 7cdf6f6747..fbe06d2c87 100644
--- a/string/tst-svc.input
+++ b/string/tst-svc.input
@@ -27,3 +27,5 @@ foo-0.10.5
 CP037
 CP1257
 CP345
+2.8-0.4
+2.8
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b22d6abbba..5239b6219b 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -151,7 +151,7 @@ gaih_local (const char *name, const struct gaih_service *service,
     {
       const struct gaih_typeproto *tp = gaih_inet_typeproto + 1;
 
-      while (tp->name != NULL
+      while (tp->name[0]
 	     && ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0
 		 || (req->ai_socktype != 0 && req->ai_socktype != tp->socktype)
 		 || (req->ai_protocol != 0
@@ -159,7 +159,7 @@ gaih_local (const char *name, const struct gaih_service *service,
 		     && req->ai_protocol != tp->protocol)))
 	++tp;
 
-      if (tp->name == NULL)
+      if (! tp->name[0])
 	{
 	  if (req->ai_socktype)
 	    return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
@@ -324,14 +324,14 @@ gaih_inet (const char *name, const struct gaih_service *service,
     {
       ++tp;
 
-      while (tp->name != NULL
+      while (tp->name[0]
 	     && ((req->ai_socktype != 0 && req->ai_socktype != tp->socktype)
 		 || (req->ai_protocol != 0
 		     && !(tp->protoflag & GAI_PROTO_PROTOANY)
 		     && req->ai_protocol != tp->protocol)))
 	++tp;
 
-      if (tp->name == NULL)
+      if (! tp->name[0])
 	{
 	  if (req->ai_socktype)
 	    return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
@@ -347,7 +347,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 
       if (service->num < 0)
 	{
-	  if (tp->name != NULL)
+	  if (tp->name[0])
 	    {
 	      st = (struct gaih_servtuple *)
 		__alloca (sizeof (struct gaih_servtuple));
@@ -358,7 +358,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  else
 	    {
 	      struct gaih_servtuple **pst = &st;
-	      for (tp++; tp->name; tp++)
+	      for (tp++; tp->name[0]; tp++)
 		{
 		  struct gaih_servtuple *newp;
 
@@ -414,7 +414,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
       /* Neither socket type nor protocol is set.  Return all socket types
 	 we know about.  */
       struct gaih_servtuple **lastp = &st;
-      for (++tp; tp->name != NULL; ++tp)
+      for (++tp; tp->name[0]; ++tp)
 	{
 	  struct gaih_servtuple *newp;