From: Ben Pfaff Date: Thu, 2 Dec 2010 22:53:54 +0000 (-0800) Subject: cfm: Use ofpbuf_new() instead of its out-of-line expansion. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2208d6b71356d85e6f2b96d8cd51ac4fc90da74e;p=openvswitch cfm: Use ofpbuf_new() instead of its out-of-line expansion. Acked-by: Jesse Gross --- diff --git a/lib/cfm.c b/lib/cfm.c index 428b1a73..567dc579 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -118,9 +118,7 @@ compose_ccm(struct cfm_internal *cfmi) struct ofpbuf *packet; struct eth_header *eth; - packet = xzalloc(sizeof *packet); - - ofpbuf_init(packet, ETH_HEADER_LEN + CCM_LEN + 2); + packet = ofpbuf_new(ETH_HEADER_LEN + CCM_LEN + 2); ofpbuf_reserve(packet, 2);