void rpc_free_all_fragments(struct rpc_context *rpc) { assert(rpc->magic == RPC_CONTEXT_MAGIC); while (rpc->fragments != NULL) { struct rpc_fragment *fragment = rpc->fragments; rpc->fragments = fragment->next; rpc_free_fragment(fragment); } }
void rpc_free_all_fragments(struct rpc_context *rpc) { assert(rpc->magic == RPC_CONTEXT_MAGIC); while (rpc->fragments != NULL) { struct rpc_fragment *fragment = rpc->fragments; SLIST_REMOVE(&rpc->fragments, fragment); rpc_free_fragment(fragment); } }