On Wed, Oct 26, 2011 at 3:27 PM, Ben Pfaff <b...@nicira.com> wrote: > diff --git a/datapath/tunnel.c b/datapath/tunnel.c > index 372d90e..047961f 100644 > --- a/datapath/tunnel.c > +++ b/datapath/tunnel.c > @@ -1347,29 +1438,57 @@ static int tnl_set_config(struct nlattr *options, > const struct tnl_ops *tnl_ops, > struct nlattr *a[OVS_TUNNEL_ATTR_MAX + 1]; > int err; > > + err = -EINVAL; > if (!options) > - return -EINVAL; > + goto error;
One other small thing: I found this style of error handling (where the error is assigned before the condition) to be prone to problems when code is moved around and the error is no longer properly initialized. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev