On Fri, Oct 28, 2011 at 11:18 AM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Oct 27, 2011 at 07:38:17PM -0700, Jesse Gross wrote: >> 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. > > Oops, I meant to use the set-after-condition style throughout but I > missed this one. > > Fixed:
Looks good. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev