about summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-22 07:34:59 +0000
committerJakub Jelinek <jakub@redhat.com>2005-08-22 07:34:59 +0000
commit8b0a52444c889fd368f51ba37ad401b6ca5d40f1 (patch)
treee61c0a96c4f02a2ae41a4a6b8b291cd0adfa75be /nis
parent964f44e4d838ce28ae848f228c7212cf609ace3c (diff)
downloadglibc-8b0a52444c889fd368f51ba37ad401b6ca5d40f1.tar.gz
glibc-8b0a52444c889fd368f51ba37ad401b6ca5d40f1.tar.xz
glibc-8b0a52444c889fd368f51ba37ad401b6ca5d40f1.zip
Updated to fedora-glibc-20050822T0727
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_subr.c2
-rw-r--r--nis/nis_xdr.c2
-rw-r--r--nis/nss_nis/nis-netgrp.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c
index 5838e30e88..7e29168111 100644
--- a/nis/nis_subr.c
+++ b/nis/nis_subr.c
@@ -39,7 +39,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
   while (name[i] != '.' && name[i] != '\0')
     i++;
 
-  if (__builtin_expect (i > buflen - 1, 0))
+  if (__builtin_expect (i >= buflen, 0))
     {
       __set_errno (ERANGE);
       return NULL;
diff --git a/nis/nis_xdr.c b/nis/nis_xdr.c
index 820103b6e9..1ef08c7890 100644
--- a/nis/nis_xdr.c
+++ b/nis/nis_xdr.c
@@ -281,7 +281,7 @@ _xdr_nis_error (XDR *xdrs, nis_error *objp)
 bool_t
 _xdr_nis_result (XDR *xdrs, nis_result *objp)
 {
-  bool res = _xdr_nis_error (xdrs, &objp->status);
+  bool_t res = _xdr_nis_error (xdrs, &objp->status);
   if (__builtin_expect (res, TRUE))
     {
       res = xdr_array (xdrs, (char **) &objp->objects.objects_val,
diff --git a/nis/nss_nis/nis-netgrp.c b/nis/nss_nis/nis-netgrp.c
index d339dd5097..7bd6527f2d 100644
--- a/nis/nss_nis/nis-netgrp.c
+++ b/nis/nss_nis/nis-netgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004
+/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004,2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -75,7 +75,7 @@ _nss_nis_setnetgrent (const char *group, struct __netgrent *netgrp)
 	 which is one byte larger than the value in LEN specifies
 	 and the last byte is filled with NUL.  So we can simply
 	 use that buffer.  */
-      assert (len > 0);
+      assert (len >= 0);
       assert (malloc_usable_size (netgrp->data) >= len + 1);
       assert (netgrp->data[len] == '\0');