summary refs log tree commit diff
path: root/nis/nss-nisplus.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-28 02:20:30 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-28 02:20:30 +0000
commit7c2034adce8d3f23ba774a83e02f0891a893f511 (patch)
tree429cf384d8f55e0bb92f2fba71816f509c2b5d7c /nis/nss-nisplus.h
parentfa39bea49e8023069711bded87d3d1398717bc1a (diff)
downloadglibc-7c2034adce8d3f23ba774a83e02f0891a893f511.tar.gz
glibc-7c2034adce8d3f23ba774a83e02f0891a893f511.tar.xz
glibc-7c2034adce8d3f23ba774a83e02f0891a893f511.zip
Update.
2001-04-27  Ulrich Drepper  <drepper@redhat.com>

	* nis/nss-nis.h: Correct test for invalid error number.
	* nis/nss-nisplus.h: Likewise.
Diffstat (limited to 'nis/nss-nisplus.h')
-rw-r--r--nis/nss-nisplus.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/nis/nss-nisplus.h b/nis/nss-nisplus.h
index 436a2e6e20..1c034c0861 100644
--- a/nis/nss-nisplus.h
+++ b/nis/nss-nisplus.h
@@ -32,9 +32,9 @@ extern const unsigned int __niserr2nss_count;
 static inline enum nss_status
 niserr2nss (int errval)
 {
-  if ((unsigned int) errval > __niserr2nss_count)
+  if ((unsigned int) errval >= __niserr2nss_count)
     return NSS_STATUS_UNAVAIL;
-  return __niserr2nss_tab[errval];
+  return __niserr2nss_tab[(unsigned int) errval];
 }
 
 #endif /* nis/nss-nisplus.h */