}
*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;
&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)
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
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;
}
}
++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;
}
}