cfm: Use ofpbuf_new() instead of its out-of-line expansion.
authorBen Pfaff <blp@nicira.com>
Thu, 2 Dec 2010 22:53:54 +0000 (14:53 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 7 Dec 2010 21:44:10 +0000 (13:44 -0800)
Acked-by: Jesse Gross <jesse@nicira.com>
lib/cfm.c

index 428b1a73dac2718ee623d24f15d9daec74aed587..567dc579e7e0713b5cf9e895ee0d9d97e73da34b 100644 (file)
--- 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);