ofproto/ofproto-dpif-xlate-cache.c
/* Append all the entries in src into dst and remove them from src.
 * The caller must own both xc-caches to use this function.
 * The 'src' entries are not freed in this function as its owned by caller.
 */
Append all the entries in src into dst and remove them from src.
The caller must own both xc-caches to use this function.
The 'src' entries are not freed in this function as its owned by caller.
Append all the entries in src into dst and remove them from src . The caller must own both xc - caches to use this function . The ' src ' entries are not freed in this function as its owned by caller .
void
xlate_cache_steal_entries(struct xlate_cache *dst, struct xlate_cache *src)
{
    if (!dst || !src) {
        return;
    }
    struct ofpbuf *src_entries = &src->entries;
    struct ofpbuf *dst_entries = &dst->entries;
    void *p;
    p = ofpbuf_put_uninit(dst_entries, src_entries->size);
    memcpy(p, src_entries->data, src_entries->size);
    ofpbuf_clear(src_entries);
}
void xlate_cache_steal_entries ( struct xlate_cache * dst , struct xlate_cache * src ) { if ( ! dst || ! src ) { return ; } struct ofpbuf * src_entries = & src -> entries ; struct ofpbuf * dst_entries = & dst -> entries ; void * p ; p = ofpbuf_put_uninit ( dst_entries , src_entries -> size ) ; memcpy ( p , src_entries -> data , src_entries -> size ) ; ofpbuf_clear ( src_entries ) ; }
Append all the entries in src into dst and remove them from src.
Append all the entries in src into dst and remove them from src .