openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/attr.c
int nla_ok(const struct nlattr* nla, int remaining)
{
    return remaining >= sizeof(*nla) && nla->nla_len >= sizeof(*nla) &&
           nla->nla_len <= remaining;
}
/**
 * Check if the attribute header and payload can be accessed safely.
 * @arg nla		Attribute of any kind.
 * @arg remaining	Number of bytes remaining in attribute stream.
 *
 * Verifies that the header and payload do not exceed the number of
 * bytes left in the attribute stream. This function must be called
 * before access the attribute header or payload when iterating over
 * the attribute stream using nla_next().
 *
 * @return True if the attribute can be accessed safely, false otherwise.
 */
Check if the attribute header and payload can be accessed safely.
@arg nla             Attribute of any kind.
@arg remaining       Number of bytes remaining in attribute stream.

Verifies that the header and payload do not exceed the number of
bytes left in the attribute stream. This function must be called
before access the attribute header or payload when iterating over
the attribute stream using nla_next().

@return True if the attribute can be accessed safely, false otherwise.
Check if the attribute header and payload can be accessed safely . @arg nla Attribute of any kind . @arg remaining Number of bytes remaining in attribute stream . Verifies that the header and payload do not exceed the number of bytes left in the attribute stream . This function must be called before access the attribute header or payload when iterating over the attribute stream using nla_next () . @return True if the attribute can be accessed safely false otherwise .
int nla_ok(const struct nlattr* nla, int remaining)
{
    return remaining >= sizeof(*nla) && nla->nla_len >= sizeof(*nla) &&
           nla->nla_len <= remaining;
}
int nla_ok ( const struct nlattr * nla , int remaining ) { return remaining >= sizeof ( * nla ) && nla -> nla_len >= sizeof ( * nla ) && nla -> nla_len <= remaining ; }
Check if the attribute header and payload can be accessed safely.
Check if the attribute header and payload can be accessed safely .