X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fpinsched.c;h=b9c6371add0bc9728ee5ce268465838be363ca51;hb=f0c689263a0424c83663b8466a64a051a012c757;hp=306d8516ecc565c5d30a3808e97b8dedf48d68ca;hpb=54e05b5f6f7d3504dc74a73dcf9707cbdb28d1d1;p=openvswitch diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index 306d8516..b9c6371a 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -16,6 +16,8 @@ #include #include "pinsched.h" +#include +#include #include #include #include @@ -228,7 +230,7 @@ pinsched_create(int rate_limit, int burst_limit, struct switch_status *ss) { struct pinsched *ps; - ps = xcalloc(1, sizeof *ps); + ps = xzalloc(sizeof *ps); port_array_init(&ps->queues); ps->n_queued = 0; ps->last_tx_port = PORT_ARRAY_SIZE;