summaryrefslogtreecommitdiff
path: root/nis/nss_nis/nis-proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-proto.c')
-rw-r--r--nis/nss_nis/nis-proto.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/nis/nss_nis/nis-proto.c b/nis/nss_nis/nis-proto.c
index 867c8da159..00e86dfa6b 100644
--- a/nis/nss_nis/nis-proto.c
+++ b/nis/nss_nis/nis-proto.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -156,10 +156,8 @@ internal_nis_getprotoent_r (struct protoent *proto,
char *p;
if (next == NULL)
- {
- *errnop = ENOENT;
- return NSS_STATUS_NOTFOUND;
- }
+ return NSS_STATUS_NOTFOUND;
+
p = strncpy (buffer, next->val, buflen);
while (isspace (*p))
@@ -213,9 +211,7 @@ _nss_nis_getprotobyname_r (const char *name, struct protoent *proto,
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;
return retval;
}
@@ -239,10 +235,7 @@ _nss_nis_getprotobyname_r (const char *name, struct protoent *proto,
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- {
- *errnop = ENOENT;
- return NSS_STATUS_NOTFOUND;
- }
+ return NSS_STATUS_NOTFOUND;
}
return NSS_STATUS_SUCCESS;
}
@@ -267,9 +260,7 @@ _nss_nis_getprotobynumber_r (int number, struct protoent *proto,
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;
return retval;
}
@@ -293,10 +284,7 @@ _nss_nis_getprotobynumber_r (int number, struct protoent *proto,
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- {
- *errnop = ENOENT;
- return NSS_STATUS_NOTFOUND;
- }
+ return NSS_STATUS_NOTFOUND;
}
return NSS_STATUS_SUCCESS;
}