openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nss-pam-ldapd/0.9.8-r0/nss-pam-ldapd-0.9.8/nss/hosts.c
static nss_status_t read_hostent(TFILE* fp, struct hostent* result,
                                 char* buffer, size_t buflen, int* errnop,
                                 int* h_errnop, int af, int retry)
{
    int32_t tmpint32;
    nss_status_t retv;
    /* check until we read an non-empty entry, error or */
    while (1)
    {
        retv =
            read_one_hostent(fp, result, buffer, buflen, errnop, h_errnop, af);
        /* check result */
        if ((retv != NSS_STATUS_SUCCESS) || (result->h_addr_list[0] != NULL))
            return retv;
        /* error of if we are not retrying */
        if (!retry)
        {
            *errnop = ENOENT;
            *h_errnop = NO_ADDRESS;
            (void)tio_close(fp);
            return NSS_STATUS_NOTFOUND;
        }
        /* skip to the next entry */
        READ_RESPONSE_CODE(fp);
    }
}
/* this is a wrapper around read_one_hostent() that checks whether the read
   address list is empty and tries the next result if available if
   retry is set */
this is a wrapper around read_one_hostent() that checks whether the read
address list is empty and tries the next result if available if
retry is set
this is a wrapper around read_one_hostent () that checks whether the read address list is empty and tries the next result if available if retry is set
static nss_status_t read_hostent(TFILE* fp, struct hostent* result,
                                 char* buffer, size_t buflen, int* errnop,
                                 int* h_errnop, int af, int retry)
{
    int32_t tmpint32;
    nss_status_t retv;
    while (1)
    {
        retv =
            read_one_hostent(fp, result, buffer, buflen, errnop, h_errnop, af);
        if ((retv != NSS_STATUS_SUCCESS) || (result->h_addr_list[0] != NULL))
            return retv;
        if (!retry)
        {
            *errnop = ENOENT;
            *h_errnop = NO_ADDRESS;
            (void)tio_close(fp);
            return NSS_STATUS_NOTFOUND;
        }
        READ_RESPONSE_CODE(fp);
    }
}
static nss_status_t read_hostent ( TFILE * fp , struct hostent * result , char * buffer , size_t buflen , int * errnop , int * h_errnop , int af , int retry ) { int32_t tmpint32 ; nss_status_t retv ; while ( 1 ) { retv = read_one_hostent ( fp , result , buffer , buflen , errnop , h_errnop , af ) ; if ( ( retv != NSS_STATUS_SUCCESS ) || ( result -> h_addr_list [ 0 ] != NULL ) ) return retv ; if ( ! retry ) { * errnop = ENOENT ; * h_errnop = NO_ADDRESS ; ( void ) tio_close ( fp ) ; return NSS_STATUS_NOTFOUND ; } READ_RESPONSE_CODE ( fp ) ; } }
this is a wrapper around read_one_hostent() that checks whether the read
address list is empty and tries the next result if available if
retry is set
this is a wrapper around read_one_hostent () that checks whether the read address list is empty and tries the next result if available if retry is set
/* check until we read an non-empty entry, error or */ /* check result */ /* error of if we are not retrying */ /* skip to the next entry */