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
struct nlattr* nla_next(const struct nlattr* nla, int* remaining)
{
    int totlen = NLA_ALIGN(nla->nla_len);

    *remaining -= totlen;
    return (struct nlattr*)((char*)nla + totlen);
}
/**
 * Return next attribute in a stream of attributes.
 * @arg nla		Attribute of any kind.
 * @arg remaining	Variable to count remaining bytes in stream.
 *
 * Calculates the offset to the next attribute based on the attribute
 * given. The attribute provided is assumed to be accessible, the
 * caller is responsible to use nla_ok() beforehand. The offset (length
 * of specified attribute including padding) is then subtracted from
 * the remaining bytes variable and a pointer to the next attribute is
 * returned.
 *
 * nla_next() can be called as long as remainig is >0.
 *
 * @return Pointer to next attribute.
 */
Return next attribute in a stream of attributes.
@arg nla             Attribute of any kind.
@arg remaining       Variable to count remaining bytes in stream.

Calculates the offset to the next attribute based on the attribute
given. The attribute provided is assumed to be accessible, the
caller is responsible to use nla_ok() beforehand. The offset (length
of specified attribute including padding) is then subtracted from
the remaining bytes variable and a pointer to the next attribute is
returned.

nla_next() can be called as long as remainig is >0.

@return Pointer to next attribute.
Return next attribute in a stream of attributes . @arg nla Attribute of any kind . @arg remaining Variable to count remaining bytes in stream . Calculates the offset to the next attribute based on the attribute given . The attribute provided is assumed to be accessible the caller is responsible to use nla_ok () beforehand . The offset ( length of specified attribute including padding ) is then subtracted from the remaining bytes variable and a pointer to the next attribute is returned . nla_next () can be called as long as remainig is > 0 . @return Pointer to next attribute .
struct nlattr* nla_next(const struct nlattr* nla, int* remaining)
{
    int totlen = NLA_ALIGN(nla->nla_len);
    *remaining -= totlen;
    return (struct nlattr*)((char*)nla + totlen);
}
struct nlattr * nla_next ( const struct nlattr * nla , int * remaining ) { int totlen = NLA_ALIGN ( nla -> nla_len ) ; * remaining -= totlen ; return ( struct nlattr * ) ( ( char * ) nla + totlen ) ; }
Return next attribute in a stream of attributes.
Return next attribute in a stream of attributes .