2001-04-27  Ulrich Drepper  <drepper@redhat.com>

	* nis/nss-nis.h: Correct test for invalid error number.
	* nis/nss-nisplus.h: Likewise.
This commit is contained in:
Ulrich Drepper 2001-04-28 02:20:30 +00:00
parent fa39bea49e
commit 7c2034adce
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-04-27 Ulrich Drepper <drepper@redhat.com>
* nis/nss-nis.h: Correct test for invalid error number.
* nis/nss-nisplus.h: Likewise.
2001-04-26 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Add getunwind.

View 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 */

View File

@ -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 */