[ovs-dev] [PATCH] ofproto-dpif: Initialize 'may_enable' at port construction time.
Ethan Jackson
ethan at nicira.com
Thu Jul 21 22:42:18 UTC 2011
Looks good.
I'm curious, this couldn't have actually caused a bug could it?
may_enable would always be initialized in the run function before used
right? Either way, this makes the code more straight forward. Thanks.
Ethan
On Thu, Jul 21, 2011 at 15:39, Ben Pfaff <blp at nicira.com> wrote:
> Silences a valgrind warning:
>
> ==640== Conditional jump or move depends on uninitialised value(s)
> ==640== at 0x808E623: run (ofproto-dpif.c:1444)
> ==640== by 0x8086593: ofproto_run (ofproto.c:755)
> ==640== by 0x806EB80: bridge_run (bridge.c:1397)
> ==640== by 0x806F66C: main (ovs-vswitchd.c:90)
> ---
> ofproto/ofproto-dpif.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index e39f615..c88569c 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -714,6 +714,7 @@ port_construct(struct ofport *port_)
> port->bundle = NULL;
> port->cfm = NULL;
> port->tag = tag_create_random();
> + port->may_enable = true;
>
> if (ofproto->sflow) {
> dpif_sflow_add_port(ofproto->sflow, port->odp_port,
> --
> 1.7.4.4
>
>
More information about the dev
mailing list