]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix warning in nis_table
authorUlrich Drepper <drepper@gmail.com>
Sat, 12 Nov 2011 05:18:19 +0000 (00:18 -0500)
committerUlrich Drepper <drepper@gmail.com>
Sat, 12 Nov 2011 05:18:19 +0000 (00:18 -0500)
ChangeLog
nis/nis_table.c

index 0fe09d0b5266b8197f8213c4fb73be0e4bf07b28..dd1e49f5db7b35c9a8a9fa565e6c3a46d3bc24f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-12  Ulrich Drepper  <drepper@gmail.com>
+
+       * nis/nis_table.c (nis_list): Use variable of correct type for
+       result of __follow_path call.
+
 2011-11-07  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/fpu/math_private.h: Using inline assembly version
index aba2897320c3372e33a7d41e6344783c324d398d..c628ed63c5d4f7c392087d24a4c465b0aa12b1b7 100644 (file)
@@ -101,8 +101,8 @@ __create_ib_request (const_nis_name name, unsigned int flags)
        }
       *val++ = '\0';
       if (search_len + 1 >= size)
-        {
-          size += 1;
+       {
+         size += 1;
          nis_attr *newp = realloc (search_val, size * sizeof (nis_attr));
          if (newp == NULL)
            goto free_null;
@@ -279,8 +279,8 @@ nis_list (const_nis_name name, unsigned int flags,
                                 &dir, &bptr, flags & ~MASTER_ONLY);
       if (status != NIS_SUCCESS)
        {
-          NIS_RES_STATUS (res) = status;
-          goto fail3;
+         NIS_RES_STATUS (res) = status;
+         goto fail3;
        }
 
       while (__nisbind_connect (&bptr) != NIS_SUCCESS)
@@ -368,12 +368,12 @@ nis_list (const_nis_name name, unsigned int flags,
            else if ((flags & FOLLOW_PATH)
                     && NIS_RES_STATUS (res) == NIS_PARTIAL)
              {
-               clnt_status = __follow_path (&tablepath, &tableptr, ibreq,
-                                            &bptr);
-               if (clnt_status != NIS_SUCCESS)
+               enum nis_error err = __follow_path (&tablepath, &tableptr,
+                                                   ibreq, &bptr);
+               if (err != NIS_SUCCESS)
                  {
-                   if (clnt_status == NIS_NOMEMORY)
-                     NIS_RES_STATUS (res) = clnt_status;
+                   if (err == NIS_NOMEMORY)
+                     NIS_RES_STATUS (res) = err;
                    ++done;
                  }
                else
@@ -428,15 +428,15 @@ nis_list (const_nis_name name, unsigned int flags,
                    NIS_RES_STATUS (allres) = NIS_RES_STATUS (res);
                    xdr_free ((xdrproc_t) _xdr_nis_result, (char *) res);
                  }
-               clnt_status = __follow_path (&tablepath, &tableptr, ibreq,
-                                            &bptr);
-               if (clnt_status != NIS_SUCCESS)
+               enum nis_error err = __follow_path (&tablepath, &tableptr,
+                                                   ibreq, &bptr);
+               if (err != NIS_SUCCESS)
                  {
                    /* Prepare for the nis_freeresult call.  */
                    memset (res, '\0', sizeof (*res));
 
-                   if (clnt_status == NIS_NOMEMORY)
-                     NIS_RES_STATUS (allres) = clnt_status;
+                   if (err == NIS_NOMEMORY)
+                     NIS_RES_STATUS (allres) = err;
                    ++done;
                  }
              }
@@ -453,12 +453,12 @@ nis_list (const_nis_name name, unsigned int flags,
                  ++done;
                else
                  {
-                   clnt_status
+                   enum nis_error err
                      = __follow_path (&tablepath, &tableptr, ibreq, &bptr);
-                   if (clnt_status != NIS_SUCCESS)
+                   if (err != NIS_SUCCESS)
                      {
-                       if (clnt_status == NIS_NOMEMORY)
-                         NIS_RES_STATUS (res) = clnt_status;
+                       if (err == NIS_NOMEMORY)
+                         NIS_RES_STATUS (res) = err;
                        ++done;
                      }
                  }