about summary refs log tree commit diff
path: root/nis/nss_nis/nis-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-network.c')
-rw-r--r--nis/nss_nis/nis-network.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/nis/nss_nis/nis-network.c b/nis/nss_nis/nis-network.c
index 25215a7674..0e40b6f26c 100644
--- a/nis/nss_nis/nis-network.c
+++ b/nis/nss_nis/nis-network.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -105,9 +105,7 @@ internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,
 
       if (retval != NSS_STATUS_SUCCESS)
         {
-	  if (retval == NSS_STATUS_NOTFOUND)
-	    *errnop = ENOENT;
-          else if (retval == NSS_STATUS_TRYAGAIN)
+          if (retval == NSS_STATUS_TRYAGAIN)
 	    {
 	      *herrnop = NETDB_INTERNAL;
 	      *errnop = errno;
@@ -206,9 +204,7 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
 
   if (retval != NSS_STATUS_SUCCESS)
     {
-      if (retval == NSS_STATUS_NOTFOUND)
-	*errnop = ENOENT;
-      else if (retval == NSS_STATUS_TRYAGAIN)
+      if (retval == NSS_STATUS_TRYAGAIN)
 	{
 	  *errnop = errno;
 	  *herrnop = NETDB_INTERNAL;
@@ -238,10 +234,7 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
       if (parse_res == -1)
 	return NSS_STATUS_TRYAGAIN;
       else
-	{
-	  *errnop = ENOENT;
-	  return NSS_STATUS_NOTFOUND;
-	}
+	return NSS_STATUS_NOTFOUND;
     }
   else
     return NSS_STATUS_SUCCESS;
@@ -289,10 +282,7 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
 		    continue;
 		  }
 		else
-		  {
-		    *errnop = ENOENT;
-		    return NSS_STATUS_NOTFOUND;
-		  }
+		  return NSS_STATUS_NOTFOUND;
 	      }
 	    else
 	      {
@@ -324,10 +314,7 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
 	    if (parse_res == -1)
 	      return NSS_STATUS_TRYAGAIN;
 	    else
-	      {
-		*errnop = ENOENT;
-		return NSS_STATUS_NOTFOUND;
-	      }
+	      return NSS_STATUS_NOTFOUND;
 	  }
 	else
 	  return NSS_STATUS_SUCCESS;