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/xfrm/selector.c
struct xfrmnl_sel* xfrmnl_sel_clone(struct xfrmnl_sel* sel)
{
    struct xfrmnl_sel* new;

    new = xfrmnl_sel_alloc();
    if (!new)
        return NULL;

    memcpy(new, sel, sizeof(struct xfrmnl_sel));
    new->daddr = nl_addr_clone(sel->daddr);
    new->saddr = nl_addr_clone(sel->saddr);

    return new;
}
/**
 * Clone existing selector object.
 * @arg sel		Selector object.
 * @return Newly allocated selector object being a duplicate of the
 *         specified selector object or NULL if a failure occured.
 */
Clone existing selector object.
@arg sel             Selector object.
@return Newly allocated selector object being a duplicate of the
specified selector object or NULL if a failure occured.
Clone existing selector object . @arg sel Selector object . @return Newly allocated selector object being a duplicate of the specified selector object or NULL if a failure occured .
struct xfrmnl_sel* xfrmnl_sel_clone(struct xfrmnl_sel* sel)
{
    struct xfrmnl_sel* new;
    new = xfrmnl_sel_alloc();
    if (!new)
        return NULL;
    memcpy(new, sel, sizeof(struct xfrmnl_sel));
    new->daddr = nl_addr_clone(sel->daddr);
    new->saddr = nl_addr_clone(sel->saddr);
    return new;
}
struct xfrmnl_sel * xfrmnl_sel_clone ( struct xfrmnl_sel * sel ) { struct xfrmnl_sel * new ; new = xfrmnl_sel_alloc ( ) ; if ( ! new ) return NULL ; memcpy ( new , sel , sizeof ( struct xfrmnl_sel ) ) ; new -> daddr = nl_addr_clone ( sel -> daddr ) ; new -> saddr = nl_addr_clone ( sel -> saddr ) ; return new ; }
Clone existing selector object.
Clone existing selector object .