X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fpinsched.c;h=b9c6371add0bc9728ee5ce268465838be363ca51;hb=a4230dedddd1909f84947b9c6cdf88a23e10a301;hp=0afd22ff645958861172c51be308349deb6f6f07;hpb=39fb08818bbd9c438dbf23caa89937c663451b5a;p=openvswitch diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index 0afd22ff..b9c6371a 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,10 @@ #include #include "pinsched.h" +#include +#include #include +#include #include #include "ofpbuf.h" #include "openflow/openflow.h" @@ -227,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;