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
void nla_nest_cancel(struct nl_msg* msg, const struct nlattr* attr)
{
    ssize_t len;

    len = (void*)nlmsg_tail(msg->nm_nlh) - (void*)attr;
    if (len < 0)
        BUG();
    else if (len > 0)
    {
        msg->nm_nlh->nlmsg_len -= len;
        memset(nlmsg_tail(msg->nm_nlh), 0, len);
    }
}
/**
 * Cancel the addition of a nested attribute
 * @arg msg		Netlink message
 * @arg attr		Nested netlink attribute
 *
 * Removes any partially added nested Netlink attribute from the message
 * by resetting the message to the size before the call to nla_nest_start()
 * and by overwriting any potentially touched message segments with 0.
 */
Cancel the addition of a nested attribute
@arg msg             Netlink message
@arg attr            Nested netlink attribute

Removes any partially added nested Netlink attribute from the message
by resetting the message to the size before the call to nla_nest_start()
and by overwriting any potentially touched message segments with 0.
Cancel the addition of a nested attribute @arg msg Netlink message @arg attr Nested netlink attribute Removes any partially added nested Netlink attribute from the message by resetting the message to the size before the call to nla_nest_start () and by overwriting any potentially touched message segments with 0 .
void nla_nest_cancel(struct nl_msg* msg, const struct nlattr* attr)
{
    ssize_t len;
    len = (void*)nlmsg_tail(msg->nm_nlh) - (void*)attr;
    if (len < 0)
        BUG();
    else if (len > 0)
    {
        msg->nm_nlh->nlmsg_len -= len;
        memset(nlmsg_tail(msg->nm_nlh), 0, len);
    }
}
void nla_nest_cancel ( struct nl_msg * msg , const struct nlattr * attr ) { ssize_t len ; len = ( void * ) nlmsg_tail ( msg -> nm_nlh ) - ( void * ) attr ; if ( len < 0 ) BUG ( ) ; else if ( len > 0 ) { msg -> nm_nlh -> nlmsg_len -= len ; memset ( nlmsg_tail ( msg -> nm_nlh ) , 0 , len ) ; } }
Cancel the addition of a nested attribute
 @arg msg             Netlink message
 @arg attr            Nested netlink attribute
Cancel the addition of a nested attribute @arg msg Netlink message @arg attr Nested netlink attribute