From 2208d6b71356d85e6f2b96d8cd51ac4fc90da74e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 2 Dec 2010 14:53:54 -0800 Subject: [PATCH] cfm: Use ofpbuf_new() instead of its out-of-line expansion. Acked-by: Jesse Gross --- lib/cfm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.30.2