Correct test for invalid error number.
authordrepper <drepper>
Sat, 28 Apr 2001 02:17:52 +0000 (02:17 +0000)
committerdrepper <drepper>
Sat, 28 Apr 2001 02:17:52 +0000 (02:17 +0000)
nis/nss-nis.h

index 8d5ff56..a607196 100644 (file)
@@ -31,9 +31,9 @@ extern const unsigned int __yperr2nss_count;
 static inline enum nss_status
 yperr2nss (int errval)
 {
-  if ((unsigned int) errval > __yperr2nss_count)
+  if ((unsigned int) errval >= __yperr2nss_count)
     return NSS_STATUS_UNAVAIL;
-  return __yperr2nss_tab[errval];
+  return __yperr2nss_tab[(unsigned int) errval];
 }
 
 #endif /* nis/nss-nis.h */